$(function(){
   $(document).mousemove(function(e){
         draw([ e.pageX, e.pageY ]);
    });
});

do you really need to generate an array?  I suppose draw( e.pageX,
e.pageY ); will be a bit faster.

On Oct 25, 6:57 pm, powtac <[EMAIL PROTECTED]> wrote:
> Is there a way to reduce the cpu load when I do something like this
> (and move the pointer very fast on the screen):
>
> $(document).mousemove(function(e) {
>         x = e.pageX;
>         y = e.pageY;
>         draw([x,y]);
>
> });
>
> Something like, "wait until the browser is ready" ?

Reply via email to