Sunday, January 25, 2009

[jQuery] Re: Can JQuery solve the iframe height=100% problem?

see if this works. chances are that the iframe content hasn't loaded
yet when onready runs, so bind the height change to the iframe load
callback.

var $ifbody = $('#fileTreeIframe').contents().find( 'body' );
$ifbody.bind( 'load', function() {
$('#fileTreeIframe').height( $ifbody.height() );
});

No comments: