I am new to jquery and am currently trying to set a variable equal to the height of some div with id="thing"
before animating another div with class=".init_leftbar"
by the same quantity.
var iHeight = $("#thing").height();
$(".init_leftbar").animate({top: iHeight + "px"});
However, this does not seem to be working.
if I just set "iHeight"
equal to some number it will animate however.
I figured there has been some misunderstanding on my part as to how the "height()"
method works.
Any help is greatly appreciated.
I would try to print $("#thing").height() in the browser console with
to see what is returning from the div. I also noticed that .height() has some problems with absolute positioned divs given a display:block; style.