[jQuery] Re: Getting Superfish menus to overlap in IE

2008-09-25 Thread Aaron
Ok, I was wrong, it is working. I happened to be on a page where there was another error having to do with the Superfish declaration that was causing problems. Still working on that other issue with jQuery conflicting with LightWindow (Joel has already responded to that post). As a side note, I d

[jQuery] Re: Getting Superfish menus to overlap in IE

2008-09-25 Thread Aaron
I tried this and it did not give any of the li's a z-index. I even placed the function inside the document.ready function. Here is what I changed the function to read as: jQuery('ul.sf-menu li').each(function(i){ jQuery(this).css('z-index',30-i); }); I did also try using '#sf-menu li' (ye

[jQuery] Re: Getting Superfish menus to overlap in IE

2008-09-23 Thread Joel Birch
Great stuff Ricardo! Thanks for doing this. Just a small warning: you said "which equals the element's index in relation to its parent". Whilst this probably does work in most cases, be aware that (as far as I know) DOM elements are not guaranteed to be returned in the order they appear in the so

[jQuery] Re: Getting Superfish menus to overlap in IE

2008-09-23 Thread ricardobeat
It's quite simple, the each() function already passes a variable to the inner function, which equals the element's index in relation to is parent. --> this is index 0 --> index 1 --> 2 etc What my code does is iterate over all the elements and for each one, give it the inline css

[jQuery] Re: Getting Superfish menus to overlap in IE

2008-09-23 Thread Aaron
Two questions? Wouldn't I have to still pass a value for i for each instantiation of an li? Or do I not quite understand how this works? Basically could you explain how this works a little bit so that I fully understand the jQuery and JS behind it. I would really appreciate that. The other quest

[jQuery] Re: Getting Superfish menus to overlap in IE

2008-09-23 Thread ricardobeat
or better yet (thanks Eric!): $('#menu li').each(function(i){ $(this).css('z-index',10-i); }); - ricardo On Sep 23, 3:06 pm, ricardobeat <[EMAIL PROTECTED]> wrote: > $('#menu li').each(function(){ >  var zindex = 10 - $(this).parent().find('li').index(this); >  $(this).css('z-index',zindex)

[jQuery] Re: Getting Superfish menus to overlap in IE

2008-09-23 Thread ricardobeat
$('#menu li').each(function(){ var zindex = 10 - $(this).parent().find('li').index(this); $(this).css('z-index',zindex); }); On Sep 23, 10:12 am, Aaron <[EMAIL PROTECTED]> wrote: > Unfortunately I don't understand the jQuery enough to put something > like that together. Anyone else understand i

[jQuery] Re: Getting Superfish menus to overlap in IE

2008-09-23 Thread Aaron
Unfortunately I don't understand the jQuery enough to put something like that together. Anyone else understand it enough to give this a whirl? Aaron On Sep 22, 9:55 pm, "Joel Birch" <[EMAIL PROTECTED]> wrote: > Your solution for fixing this incarnation of the IE z-index bug is > actually the onl

[jQuery] Re: Getting Superfish menus to overlap in IE

2008-09-22 Thread Joel Birch
Your solution for fixing this incarnation of the IE z-index bug is actually the only one I have ever come across, so whilst it is hacky, it's probably as good as you are going to get. I guess a nifty bit of jQuery could make applying the z-indexes easier and keep the source HTML clean. If anyone w