CSS Set Div 'top' With Jquery From Div 'height'


Answer :

You will need to set the css property 'top' on the #footer div, not call .top() on the div itself.



$("#footer").css('top', $("#text").height() + "px");


or along those lines



Replace .top with .offset({top: somenumber})



http://api.jquery.com/offset/



Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable