Hummm!
Tks for the link.
There are others elements in the DOM tree of the document.
Try:
$('.description img:eq(0)').addClass('icon_selected') // add class to the
1st image element whitin div.description
MaurĂcio
-----Mensagem Original-----
De: "Martynas Brijunas" <[email protected]>
Para: "jQuery (English)" <[email protected]>
Enviada em: quinta-feira, 8 de janeiro de 2009 09:11
Assunto: [jQuery] Re: Highlighting the first element in multiple DIVS
Hi Mauricio,
$('.description a:first-child img').addClass('icon_selected');
the complete not-working example can be found here:
http://0.latest.gentlecolours.appspot.com/albums?album_name=Leigh_on_sea
Two things come to my mind: the statement is placed in the wrong place
or it clashes with some other JS on the page (Thickbox and Google
Checkout).
Best regards,
Martin