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

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -