I would like to be able to detect if the mouse is still over the element in the following scenario:
How can I achieve #2?
Thank you.
This seems to work (http://jsbin.com/uvoqe)
$("#hello").hover( function () {
$(this).data('timeout', setTimeout( function () {
alert('You have been hovering this element for 1000ms');
}, 1000));
}, function () {
clearTimeout($(this).data('timeout'));
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With