javascript - How can I write this function on mouse hover a div? -
how can write function when mouse resting on div .resting trigger call. here code:
$(document).bind('mousemove', function() { resetactive() });
i want call resetactive when mouse resting on desired div .resting. how can write code?
$('.resting').mouseenter(resetactive);
or, clean , better practice,
$('.resting').on('mouseenter', resetactive); // , later $('.resting').off('mouseenter', resetactive);
and event:
var resetactive = function(e) { // something... }
Comments
Post a Comment