as shown below, if the user hovers over the div, then how to stop the erosion of the div? and if it doesn’t hover over a div, then it fades regardless of the time set for.?
below is the code I'm using .... for fadein and fadeout:
$("#success").fadeOut('slow');
$("#success").fadeIn('slow');
$("#success").fadeTo(5000, 1).fadeOut(2000);
my div:
<div class="success"><a href="#" class="close">×</a>status message here...</div>
I tried this:
if ($('#success').is(':hover')) { //dont close me and reset the time ...}
Result:

source
share