Or try: $("#subnav li:first-child").addClass("ieTop");
On 28 abr, 22:15, Hamish Campbell <[EMAIL PROTECTED]> wrote:
> One alternative method is:
>
> $('#subnav li').eq(0).addClass('ieTop');
>
> On Apr 29, 11:58 am, hubbs <[EMAIL PROTECTED]> wrote:
>
> > I am trying to add a class to the first child in IE6 because the css
> > first child does not work in IE6.
>
> > So, here is what I used:
>
> > $("#subnav li:first").addClass("ieTop");
>
> > But it does not seem to work, any ideas on what I did wrong? Or does
> > IE6 not play well with jQuery?