> Delay the execution as soon as possible.
>
> var doc = document.documentElement;
> doc.onmousemove = (function(i){
> return function(e){
>     if(i !== 0)
>         clearTimeout(i);
>     i = setTimeout(function(){
>         console.log(e.pageX+', '+e.pageY);
>         i = 0;
>     }, 1);
>
> };
> })(0);

Ooofftch.  I'm not sure I like that.  We know that most browsers don't
handle timings lower than ~15ms.  I don't want to introduce 15ms of
unresponsiveness into my mousemove detection.  Plus, for browsers
without the bug, if one mouse mousemove occurs at 0.000s and the next
at 0.014s, the timer won't fire until 0.029s - that's a 29ms lag!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to