[jQuery] Re: Get first element when there are multiple classes

2009-06-16 Thread Dave
Ahh, great. Thanks. On Jun 16, 11:05 pm, Ricardo wrote: > Standard CSS selector for multiple classes. liEven is not a descendant > of .liRow, just put them together: > > $("#ulList .liRow.liEven:first") > > On Jun 16, 9:57 am, Dave wrote: > > > > > Hi > > > How do you get the first element when

[jQuery] Re: Get first element when there are multiple classes

2009-06-16 Thread Ricardo
Standard CSS selector for multiple classes. liEven is not a descendant of .liRow, just put them together: $("#ulList .liRow.liEven:first") On Jun 16, 9:57 am, Dave wrote: > Hi > > How do you get the first element when the element got multiple > classes? > > >         1 >         2 >  

[jQuery] Re: Get first element when there are multiple classes

2009-06-16 Thread Mauricio (Maujor) Samy Silva
I am not sure on what are you trying to do, but alert($("#ulList .liEven:first").attr("class")); /* Returns Success*/ Maurício -Mensagem Original- De: Dave Para: jQuery (English) Enviada em: terça-feira, 16 de junho de 2009 09:57 Assunto: [jQuery] Get first element when the

[jQuery] Re: Get first element when there are multiple classes

2009-06-16 Thread Dave
Ok, so I have to split it up. Thanks for the answer. =) On Jun 16, 3:02 pm, waseem sabjee wrote: > Sorry syntax error > > var list_items = $(".liRow"); > > $("#btSave").click(function() { > > alert(list_items.eq(0).attr("class")); > > } > }); > > On Tue, Jun 16, 2009 at 3:01 PM, waseem sabjee w

[jQuery] Re: Get first element when there are multiple classes

2009-06-16 Thread waseem sabjee
Sorry syntax error var list_items = $(".liRow"); $("#btSave").click(function() { alert(list_items.eq(0).attr("class")); } }); On Tue, Jun 16, 2009 at 3:01 PM, waseem sabjee wrote: > var list_items = $(".liRow"); > > $("#btSave").click(function() { > > alert(list_items).eq(0).attr("class"));

[jQuery] Re: Get first element when there are multiple classes

2009-06-16 Thread waseem sabjee
var list_items = $(".liRow"); $("#btSave").click(function() { alert(list_items).eq(0).attr("class")); } }); On Tue, Jun 16, 2009 at 2:57 PM, Dave wrote: > > Hi > > How do you get the first element when the element got multiple > classes? > > >1 >2 >3 >