[jQuery] Re: Select a tricky image with jQuery.

2008-11-12 Thread Smith, Allex
This could be a poor html design issue and I would try to change it to start. But if you are stuck with what you have you can try something like this: $("img[src$='first.gif']"); For more info check out: http://docs.jquery.com/Selectors This is untested as always. Good luck Allex -Origina

[jQuery] Re: Select a tricky image with jQuery.

2008-11-12 Thread yo2lux
By the way is possible to set an event listener using the title attribute ? I think is possible for me to set title="first" in html On Nov 12, 11:47 pm, yo2lux <[EMAIL PROTECTED]> wrote: > The situation is a bit complicated. I don't see each image on page. > I have the first image on contact page

[jQuery] Re: Select a tricky image with jQuery.

2008-11-12 Thread yo2lux
The situation is a bit complicated. I don't see each image on page. I have the first image on contact page. :( So .imagefield:eq(0) is not a good solution On Nov 12, 11:36 pm, George <[EMAIL PROTECTED]> wrote: > You can do > $('.imagefield:eq(0)') to select first image out of all 'imagefield' > >

[jQuery] Re: Select a tricky image with jQuery.

2008-11-12 Thread George
You can do $('.imagefield:eq(0)') to select first image out of all 'imagefield' George On Nov 12, 4:33 pm, yo2lux <[EMAIL PROTECTED]> wrote: > I have some image on webpage: > > > > > > > > I need to set an event listener only on the first image. > - I think, $('.imagefield') is not a good sol