title: Prevent click event jquery
body: <p>I have a number of list items that contain images within links. When one of these links is clicked, I want to get containing <code>li</code>'s rel attribute only, without following the click event though. Following the event through currently opens the link image up in a new page which I do not want. </p>
  
  <p>I have tried   <code>return false;</code> within my function but this doesnt work (see below). I have also tried this on the actual link in the mark up but I would rather not do this as this isn't best practice.</p>
  
  <pre><code> $('a.main-img').click(function (){
  
      var liRel = $(this).closest('li').attr('rel');
      var relNumber = $('#banner-holder').find('img').attr('id', liRel);
      rotatePics(relNumber);
  
      return false;
  
  });
  </code></pre>