Hello everyone,

This is my first post to the list.
I became aware of JQuery less than 2 weeks ago, was, very impressed by  
its efficiency and started using it in some of my projects, even  
though i'm not a very good javascript developer. I hope you'll forgive  
my question if it's stupid.

I have put some external links in a menu and want to open them in an  
external window; the html looks like this:

<ul id="liens">
  <li><a href="#"><img src="triggerimage" .. /></a>
   <ul class="deroulant">
    <li><a href="#" class="pliant">header 1</a>
     <ul>
      <li><a href="uri1">link1</a></li>
      <li><a href="uri2">link2</a></li>
        etc.
     </ul>
    </li>
    <li><a href="#" class="pliant">header 2</a>
     <ul>
      <li><a href="uri3">link3</a></li>
      <li><a href="uri4">link4</a></li>
        etc.
     </ul>
    </li>
        etc.
   </ul>
  </li>
</ul>

The menu unfolds when i click on the trigger image, then i use the  
accordion plugin to toggle the submenus. This works fine.

I have written a rule to select the links in the menu and open them in  
a new window; however, i need to avoid the header links, otherwise  
they open a "#" link in a new window. So i've tried chaining my  
selector with a not, like this:

$(".deroulant a").not($(".pliant")).click(function() {
  window.open(this.href);
  return false;
});

But it doesn't work: if i click on a "pliant" link, the new window  
opens anyway...

I'm almost certain i have failed to understand something. I hope  
someone can enlighten me!

Best regards,

-- 
   sholby
   courriel : [EMAIL PROTECTED]
   web      : http://www.sholby.net/



_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to