Make function execute after user hovers over link for 2 seconds
<p>Yes, I know this question has been asked before, but I can't find an answer that works. This is an accepted answer from one of the other questions:</p>

<pre><code>$('#element').hover(function()
{
    $(this).data('timeout', window.setTimeout(function()
    {
        alert('hovered for 2 seconds');
    }, 2000));
},
function()
{
    clearTimeout($(this).data('timeout'));
    alert('mouse left');
});
</code></pre>

<p><a href="http://jsfiddle.net/nCcxt/" rel="nofollow">http://jsfiddle.net/nCcxt/</a></p>

<p>As you see it doesn't do what it's supposed to.</p>

<p>What I need is simple in theory but I can't get it to work - when a user hovers over a link for 2 seconds, a function is called. If the user moves the mouse away before 2 seconds pass, nothing happens.</p>
