With the HTML you've given $(".res [EMAIL PROTECTED]")  works for me.

However $(".res img").not("[EMAIL PROTECTED]") does not work. Changing it to:

    $(".res img").not("[EMAIL PROTECTED]")

Results in the same elements as the $(".res [EMAIL PROTECTED]") selection.

What version of jQuery are you using?

Karl Rudd

On 1/31/07, Stéphane Nahmani <[EMAIL PROTECTED]> wrote:
> Hello folks,
>
> I seem to have a problem with a selector, which i have turned every
> way i could think of with no results, so i'm asking for your advice. I
> had this html (pared down):
>
> <div id="rapide" class="res">
>         <img src="itineraires/rapide_on.gif" width="540" height="459"
> border="0" alt="Le plus rapide" usemap="#rapide_Map" />
> </div>
>
> <div id="corres" class="res">
>         <img src="itineraires/corres_off.gif" alt="Le moins de
> correspondances" width="540" height="66" />
> </div>
>
> <div id="ferre" class="res">
>         <img src="itineraires/ferre_off.gif" alt="Ferré uniquement"
> width="540" height="66" />
> </div>
>
> I wanted a selector to trigger an action when either of the "off"
> images were clicked and tried:
>
>         $(".res [EMAIL PROTECTED]").click( function() { // do sth });
>
> which produces nothing.
>
>         $(".res img").not("[EMAIL PROTECTED]").click( function() { // do sth 
> });
>
> otoh returns all 3 images.
>
> And i had the same problem when i tried to test the usemap attribute
> instead. So what am i doing wrong?
> (In the end, i added an id to the "on" image, which works. But i would
> rather have avoided that...)
>
> Thanks...
>
> --
>    Stéphane Nahmani / sholby
>    courriel : [EMAIL PROTECTED]
>    web      : http://www.sholby.net/
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to