Cool! It's always great to see how different people come up with
different solutions.

I'm curious why you need to toggle the iframe's display if you are
hiding and showing its parent? Am I missing something? It seems like
it is just an extra call in the chain that is unnecessary. I also
explained how one might easily replicate the functionality of dojo's
BackgroundIframe class in a thread here recently.

I do an insertBefore instead of an append not just for performance but
also for automatic lower z-index. And it makes me feel better about my
markup... in case I append anything else to the parent element I know
that my iframe isn't just thrown into the middle of it all. Most
likely something only myself would like, as I tend to get a little
weird about clean code (XHTML included).

I might suggest adding a class instead of just looking for iframe.
Some people still use iframes for other purposes and this would show
and hide them.

I do need to incorporate your check for IE6 sometime before IE7 comes
out... heh ... when IE7 finally comes out... :)

--
Brandon Aaron

On 10/4/06, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> Brandon Aaron schrieb:
> > I went ahead and added my bgiframe plugin into SVN here:
> > http://svn.brandonaaron.net/svn/jquery_plugins/bgiframe.js
> >
> > A big thanks goes out to Mark Gibson for pointing me in the right
> > direction with using the expression in the CSS!
> >
>
> Hi,
>
> I made my own version of that plugin:
>
> * you don't have to call show() for the iframe anymore (uses toggle)
> * an iframe is created on demand (I found that if you create several
> iframes at once it slows down IE pretty much)
>
> http://stilbuero.de/jquery/bgiframe/jquery.bgiframe.js
>
> Usage:
>
> $('div').show().bgiframe();
> $('div').hide().bgiframe();
>
>
> -- Klaus
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to