Reputation: 19712
I'm trying to get the height of an <iframe>d document. My first instincts were:
$('iframe').document.height();
or
$('iframe').contentWindow.document.height();
Those don't work, and I'm not having much luck searching. I would appreciate any help!
Upvotes: 1
Views: 447
Reputation: 253
Try this out:
$(document).ready(function(){
$("iframe").bind('mouseover', function(){
alert($(this).contents().height());
});
});
Upvotes: 0
Reputation: 34367
$("iframe",top.document).contents().height();
alert("iframe height=" + $("iframe",top.document).height());
Upvotes: 2