I read about the problems when the mousemove event is mousemove twice in Safari / Webkit, but the problem I am facing is that mousemove fires even if the mouse is not moved, That is: it fires already when the mouse cursor is over the context to which the event is attached when the page is loaded / updated. And since I am attaching it to document (full browser viewing screen), it starts right away in Safari. I tried attaching it to the html element, to body and to the wrapper of the div . Without changes.
$(document).bind('mousemove', function() { alert('Mouse moved!'); $(document).unbind('mousemove'); });
Is works fine in other browsers. Does anyone see what I'm doing wrong? Thanks.
javascript jquery javascript-events mousemove
Roel
source share