Run function after mouse down for set time jQuery/JS
<p>Basically when you hold down any of the buttons with the class of <code>block_delete</code> for more than 1 second, the <code>OpenLoader()</code> should run. I googled and looked around on here and then made this, it kind of works:</p>

<pre><code>var functionDeleteBlockDia = function() { 
    $(".block_delete").mouseup(function (){ 
        event.preventDefault(); 
        });
    $(".block_delete").mousedown(function (){ 
        setTimeout(function(){
            OpenLoader();
            }, 1000);
            });

}
</code></pre>

<p>The problem I'm having is that on mouseup the <code>OpenLoader();</code> dies, I tried to unbind mouseup even though there's no function attached to it, I tried to attach <code>event.preventDefault();</code> on it as you can see above, but it still didn't work. </p>
