title: Performing an action on idle state in JavaScript
body: <p>I'm trying to set up a script in a webpage that does the following: if the mouse is inactive for a certain amount of time (say, five seconds), perform an action (say, hiding an element); then, if the mouse of moved, perform an action (say, un-hiding the element).</p>
  
  <p>What I want is some way to perform an action on user mouse inactivity (not necessarily keyboard inactivity).</p>
  
  <p>Thanks for your help.</p>