title: jQuery: trigger() on a link
body: <p>I am trying to <code>trigger()</code> a link but it does not seem to work.</p>
  
  <p>An <code>&lt;img&gt;</code> element has a <code>rel</code> attribute that contains the id of the link.
  Clicking on the element should trigger the corresponding link if possible.</p>
  
  <p>I think the problem is that I'm capturing a jQuery click event rather than the native link action.</p>
  
  <p>Anyway, here is the code for you to see:</p>
  
  <pre><code>$("#contentmenu li a").click(function(e){
      switch(e.target.id){
          case "opt1":
              alert('do something');
          break;
          case "opt2":
              alert('do something');
          break;
          case "opt3":
              alert('do something');
          break;
      }
      //return false;
  });
  
  $("#box_content img").click(function(e){
      menuItem=$(this).attr('rel');
      $('#'+menuItem).trigger('click');
      //return false;
  });
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>I found my answer: It is not possible to trigger the link's native event this way
  so I will resort to using <code>window.location</code> instead.</p>