How can I prevent a user from middle clicking a link with javascript or jquery
<p>I want to prevent the user from being able to middle click a certain link to open a new tab. I have tried the following:</p>

<pre><code>$(window).on('mouseup', '.sptDetails', function(e){
    e.preventDefault();
    if(e.button == 1){
        return false;
    }
});
</code></pre>

<p>This doesn't seem to work.</p>
