Hi
I try to call a function when the mouse stops moving for seconds. This is actually pretty easy with the following code:
var timer = null;
$(document).mousemove(function(){
clearTimeout (timer);
timer = setTimeout(myfunction, 5000);
});
But the mousemove event is triggered very often, so I get a pretty heavy CPU load in Firefox when moving the mouse. Is there an easy way to do the same with smaller function calls ???
Thanx! Jan
source
share