I’ve searched everywhere including here and haven’t been able to come up with a good solution. I ran into this and it works in everybrowser except Firefox and IE 🙁 Help?
jQuery(function() {
sizeIFrame();
jQuery("#ifrm").load(sizeIFrame);
});
function sizeIFrame() {
var videoBrowser = jQuery("#ifrm");
var innerDoc = videoBrowser.get(0).contentDocument ?
videoBrowser.get(0).contentDocument.documentElement :
videoBrowser.get(0).contentWindow.document.body;
videoBrowser.height(35);
videoBrowser.height(innerDoc.scrollHeight + 35);
}
and it’s on the same domain and here’s my <iframe>
<iframe id="ifrm" src="http://localhost:8080/linkconsulting/temp.html" width="100%" frameborder="0" scrolling="no"></iframe>
I’m testing on localhost right now but it will still be on same domain later.
Update:
So I’ve noticed that this is not working because it seems to be interfering with tiny.scrollbar plugin or viceversa. Not sure what to do here 🙁
Well I ended up taking a different approach. I got the contents from inside the iframe and inserted them inside a div. Here’s the code in case anyone else needs it.. Thank you all for your patience and great help.