
Untitled
By: a guest on
Apr 26th, 2012 | syntax:
None | size: 0.52 KB | hits: 24 | expires: Never
jQuery height() differs from clientHeight
<div class="obj">
<img width="896" height="595" src... />
<div class="details">
<h2>Title</h2>
<p>...</p>
</div>
</div>
<div class="obj">
<img width="896" height="595" src... />
<div class="details">
<h2>Title</h2>
<p>...</p>
</div>
</div>
$objs = $('.obj');
$objs.each(function() {
console.log($(this).height());
}
$(window).load(
function() {
$objs = $('.obj');
$objs.each(function() {
console.log($(this).height());
}
}
);