I am looking for a way to repeat a mouseover action until the user moves away from the target. A mouseover invokes a function once, I am looking for a way to keep doing the function.
Cheers, Gazler.
You'll need to use setInterval():
setInterval()
var to; var doStuff = function() { console.log('doing stuff...'); }; $('a').hover(function(e) { to = window.setInterval(doStuff, 1); },function(e) { window.clearInterval(to); })
1.4m articles
1.4m replys
5 comments
57.0k users