jQuery height() returns 0 on a visible div – why?

Make sure the code is inside the $(window).load [not $(document).ready ]

$(window).load(function () {
    newhgt = $('#thetext1').find('div.rhs').css("background", "pink").height();
});

Leave a Comment