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 did have to change the jQuery that you wrote ricardo as a result of it not finding the li's for whatever reason. I changed it to: jQuery('ul.sf-menu').children('li').each(function(i){ jQuery(this).css({"z-index":30-i}); }); To grab the first level of children and: jQuery('ul.sf-menu').find('li > ul > li').each(function(i){ jQuery(this).css({"z-index":100-i}); }); To grab the next level of children and so on. I also found that it didn't reset the index if it was all one function which resulted in getting huge negative values without setting the initial value to be something HUGE. Suggestions for a way to easily limit that even more? ~Aaron On Sep 25, 12:44 pm, Aaron <[EMAIL PROTECTED]> wrote: > 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' (yes, I put the ID on the ul > first). I was expecting it to at least put a z-index of 30 on the > first list item but it hasn't done so. I was also wondering if this > would go down into each submenu item and place z-index's on those too > (assuming it will work on the set up I have). > > ~Aaron > > On Sep 23, 9:38 pm, "Joel Birch" <[EMAIL PROTECTED]> wrote: > > > 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 source (although they > > probably are most of the time). I think there was a recent jquery-dev > > thread discussing this. > > > @Aaron - I'm really interested to know if this solutions works - could > > you please report back if Ricardo's code fixes your IE z-index > > problem? > > > Cheers > > Joel Birch.