How to activate mouseleave, if it has been x amount of time?
<p>So, I've got this type of situation, but I only want to "Do something" if the user "mouseleave(s)" for more than x amount of time, say one second. How should I implement that?</p>

<pre><code>$("#someElement, #someOtherElement").mouseleave(function() {
   // Do something.
});
</code></pre>

<p>Later I added:</p>

<pre><code>    $('.popover3-test').popover({
        placement:'bottom',
        template: $('.popover2'),
        trigger: 'manual',

        }).mouseenter(function(e) {
        $(this).popover('show');

        $(".popover3-test, .popover2").each(function() {
            var t = null;

            $(this)
                .mouseleave(function() {
                    t = setTimeout(function() {
                        $('.popover2').hide();
                    }, 1000); // Or however many milliseconds
                })
                .mouseenter(function() {
                    if(t !== null)
                        clearTimeout(t);
                })
            ;
        });


});
</code></pre>
