JQuery doesn't seem to be working...
Hello. I have some JQuery code on my test site to set the margin and padding of some elements, but it doesn't seem to be working. Does anyone mind looking at my code to see if there is anything I am doing incorrectly?
- var footerheight=$('#footer').height();
- var footerheight=footerheight+43;
- var negfooterheight=footerheight*-1;
- $('#main').css('padding-bottom', footerheight);
- $('#footer').css('margin-top', negfooterheight);
First, I am trying to get the height of #footer, and store that as footerheight.
Then I want to add 43 to that.
Next I am making a new variable called negfooterheight, which is basically footerheight * -1.