On 18/03/2007, at 6:34 AM, Brandon Aaron wrote: > Okay so I did some testing with this idea and if the element has a > background color on it, the iframe will show above it. You can see the > result on my test page. > > -- > Brandon Aaron > > On 3/17/07, Brandon Aaron <[EMAIL PROTECTED]> wrote: >> Hey Joel, >> >> Thanks for the information! It is true that the iframe is behind the >> element it is called on by setting the z-index to -1 and by where it >> is inserted into the DOM. The only time the iframe should show >> through >> is if a child element (of the element that has the bgiframe method >> called on it) has an opacity of less then 1 on it. I believe I will >> take out setting the opacity by default (since in most cases it >> doesn't matter) and add an option to include it. >> >> -- >> Brandon Aaron
Hey Brandon, thanks for adding that option - it is perfect. I notice you have set the default as opacity:true (as in, you decided against taking out setting the opacity by default). Is that because of your tests (mentioned in your later post) where the iframe showed through? Regarding that, you said "if the element has a background color on it, the iframe will show above it". When I tested this on my demo page I found that with the opacity code deleted the iframe *always* showed above the element it was attached to *regardless* of whether or not a background colour was set. The reason I didn't notice this earlier is because the element's children (li elements in my case) have background colours so they hide the iframe in effect. So I think your current default setting of opacity:true is probably a good idea because 1. it emulates its regular behaviour, and 2. when the situation is like my case the developer can take advantage of setting the opacity option to false and enjoy perfect animations. This is perfect for my menu plugin and I have updated my demo page to take advantage of it. This involved using your option to set opacity:false and also adding the following line to my superfish plugin's 'out' function: .find("iframe", this).remove(); I had to add that to the plugin because I wanted it to happen after the mouseout delay, not immediately on mouseout. Anyway, now both slides and fades work perfectly in IE6 (check my demo page) and there is no lag whatsoever! The menu now works equally well in all regards for IE6 as it does for other browsers. I guess the only downside in my case is how convoluted the code is for applying the bgIframe to the menu: $(document).ready(function(){ $(".nav") .superfish({ animation : { opacity:"show",height:"show"} }) .find(">li[ul]") .mouseover(function(){ $("ul", this).bgIframe({opacity:false}); }) .find("a") .focus(function(){ $("ul", $(".nav>li[ul]")).bgIframe({opacity:false}); }); }); Thanks for your help Brandon. Cheers Joel. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/