$('iframe').load(function() {
var height = jq(this)[0].contentWindow.document.body.scrollHeight + 24;
$(this).animate( { height: height });
});
jQuery Dynamic iFrame height based on content
This method only works when the iFrame shares the same domain as the parent domain.
Snippet Viewed 5575 times.
Share your jQuery code snippets:
- Get some recognition & a link back to your site.
- Create your own code library.
- Help your fellow developers, as they have helped you.
Related Articles