Mouseleave only when mouseenter ends
<p>with the follow code:</p>

<pre><code>$('someelement').hover(
    function() {
        console.log('mouseenter begin');
        setTimeout(function() {
            console.log('mouseenter ends');
        }, 2000);
    },
    function() {
        console.log('mouseleave begin');
        setTimeout(function() {
            console.log('mouseleave ends');
        }, 2000);
    }
)
</code></pre>

<p>If I enter and leave div at some times (or one time less then 2 seconds) my console get:</p>

<pre><code>mouseenter begin
mouseleave begin
mouseenter ends
mouseleave ends
</code></pre>

<p>I want mouseleave only executed when <code>mouseenter</code> ends, but don't know how.</p>

<pre><code>mouseenter begin
mouseenter ends
mouseleave begin
mouseleave ends
</code></pre>
