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.

Reply via email to