title: Jquery: detect if middle or right mouse button is clicked, if so, do this:
body: <p>Check out my jsfiddle <a href="http://jsfiddle.net/zAGLP/5/" rel="noreferrer">demo</a>, if <code>e.which == 1</code> then when you left click the h2 it will 
  <code>e.which == 2</code> or <code>e.which == 3</code> then it wont work. 2 is the middle mouse button, and 3 is the right mouse button. i found this too:</p>
  
  <p>JQuery provides an e.which attribute, returning 1, 2, 3 for left, middle, and right click respectively. So you could also use if (e.which == 3) { alert("right click"); }</p>
  
  <p>This code isn't working:</p>
  
  <p><strong>code:</strong></p>
  
  <pre><code>    $("h2").live('click', function(e) { 
     if( e.which == 2 ) {
        e.preventDefault();
        alert("middle button"); 
     }
  });
  </code></pre>