Handling mousemove for the document node

Handling mousemove for the document node

  1. $("document").mousemove(function() {
  2.     ... /* my function won't do much, only increments a few variables. */
  3. });

Basically... is this a bad idea? I was planning to hook into this event on every page to create a session timeout system. It works so far in my tests. But a few things worry me:

- Does this work reliably across all browsers (IE6+ etc)
- Could it interfere with other javascript event handlers on the pages?

Any thoughts much appreciated,

Ben








    • Topic Participants

    • zoho