jQuery Dynamic iFrame height based on content

This method only works when the iFrame shares the same domain as the parent domain.
$('iframe').load(function() {
	var height = jq(this)[0].contentWindow.document.body.scrollHeight + 24;
	$(this).animate( { height: height });
});
Posted by
Snippet Viewed 4733 times.

Share your jQuery code snippets:

  • Get some recognition & link back to your site.

 

Submit | Browse

Most Recent jquery snippets

Most Viewed