title: jQuery text fade after 30 second idle
body: <p>I have this code to fade info text below some media after a 30 second initial delay. Once the mouse is moved, the info text snaps back to full opacity</p>
  
  <pre><code>setTimeout( '$(".media_info").animate({"opacity":".1"},5000)',30000);
  
  $(document).mousemove(function() {
     $(".media_info").css('opacity','1');
  });
  </code></pre>
  
  <p>Ideally, what I'd like to achieve is this: On page load, the mouse and scroll movements are monitored. If mouse and scroll have no input for 30 seconds, then the text would fade. Once the mouse or scroll is moved, the text goes back to full opacity, and the 30 second timer re-starts. Any ideas for the best way to achieve this? Any help would be much appreciated.</p>