title: Disable contextmenu and rightclick menu
body: <pre><code>$(document).on('mousedown', 'a', function(event){ 
      event.preventDefault();
  
      if(event.which == 1){
          if($(this).attr('target') != '_blank'){
              loadpage($(this).attr('href'));
          }
      }
  }).on('contextmenu', 'a', function(event){
      event.preventDefault();
  });
  </code></pre>
  
  <p>Hello once again Stackoverflow!</p>
  
  <p>For my current project I want to disable the right and middle mouse button on every link. And when clicked on with the left mouse button, if the link doesn't contain <code>target="_blank"</code>, I need to call a function that loads that page using AJAX. (function <code>loadpage()</code>). </p>
  
  <p>This piece of code works decently, although the middle mouse button still opens a new tab. How do I solve this?</p>
  
  <p>Thanks in advance!</p>