jQuery doesn't return proper body height on document load - Their bug or mine?
Posted
by Kyle
on Stack Overflow
See other posts from Stack Overflow
or by Kyle
Published on 2010-05-18T00:11:26Z
Indexed on
2010/05/18
0:20 UTC
Read the original article
Hit count: 447
When I use
$(document).ready(function() {
var bodyHeight = $("body").height();
console.log(bodyHeight);
});
I get a really wack number for body height. I then run
$("body").height();
in the console and get the right height. Something seems fishy about the $(document).load doing this... Yes my CSS works fine and all, so is this my bug, chromes, or jQuery's?
© Stack Overflow or respective owner