jquery get height of iframe content when loaded
ok I finally found a good solution: $(‘iframe’).load(function() { this.style.height = this.contentWindow.document.body.offsetHeight + ‘px’; }); Because some browsers (older Safari and Opera) report onload completed before CSS renders you need to set a micro Timeout and blank out and reassign the iframe’s src. $(‘iframe’).load(function() { setTimeout(iResize, 50); // Safari and Opera need a kick-start. var … Read more