Tim Marshall Tim Marshall - 1 year ago 122
Javascript Question

JQuery .height() returning 0

Live: http://rafflebananza.com/Admin/Desktop/index123.html#

I am trying to use JQuery to obtain the height for the amount of administrators under the users section of the quick side bar you see to the right.

var temp = $('.Admins').height();

The above what should be working script, regardless of if I enclose within document ready or window load, always returns the value of 0 and not the height.


It's because of the float style in the child elements. Try adding this code to clear the float:

.Group.Admins::after {
    content: '';
    clear: both;
    display: block;