console.log statements ...
$('#fileTreeIframe').load( function() {
var $ifbody = $(this).contents().find
( 'body' );
console.log($ifbody); // Outputs
Object length=1 0=body prevObject=Object jquery=1.2.6
$ifbody.css( 'height','auto' );
console.log($ifbody.height()); //
Outputs 0
$(this).height( $ifbody.height() );
});
Obviously the troubling thing here is that height is outputting zero.
Can you provide the HTML that surrounds your hard-coded iframe? There
must be something else I'm not setting in the CSS or HTML.
Thanks, - Dave
On Jan 25, 1:53 pm, dbzz <j...@briskey.net> wrote:
> i have the iframe hardcoded in the html. if you are adding it to the
> dom with js, it won't get the load event binding. you might try
> livequery or something like it.
>
> On Jan 25, 10:21 am, "laredotorn...@zipmail.com"
>
>
>
> <laredotorn...@zipmail.com> wrote:
> > Hi dbzz,
>
> > I tried the code you provided, but went from this ...
>
> >http://screencast.com/t/W8lOtgKO
>
> > to the iframe disappearing entirely ...
>
> >http://screencast.com/t/jCTjOLhpeX
>
> > I put your code in a $(document).ready() block (below). Are there any
> > other modifications I should make to get it to display at 100%?
>
> > $(document).ready(function() {
> > $('#fileTreeIframe').load( function() {
> > var $ifbody = $(this).contents().find
> > ( 'body' );
> > $ifbody.css( 'height','auto' );
> > $(this).height( $ifbody.height() );
> > });
> > });
>
> > Thanks, - Dave- Hide quoted text -
>
> - Show quoted text -
No comments:
Post a Comment