Prevent link event after mousdown down delay
<p>I'm working on a function so that when an user clicks and holds onto a link, the link does not send the user to the appropriate link. However, the function that I used is not working. What I want is for the user to click on a link and if they hold it down for longer than one second, the link no longer works and no event is fired. After looking through it sometime, I can't find what's wrong with the code. So my question is, what did I do wrong? <a href="http://jsfiddle.net/rQP6g/2/" rel="nofollow">http://jsfiddle.net/rQP6g/2/</a></p>

<pre><code>&lt;a href="www.google.com" &gt;link&lt;/a&gt;

&lt;script&gt;
var timeoutId = 0;
    $('a').mouseup(function() {
    timeoutId = setTimeout(function(e) {  
    e.preventDefault();
e.stopPropagation();
}, 1000);
}).bind('mouseup', function() {
clearTimeout(timeoutId);
});
&lt;/script&gt;
</code></pre>
