title: How to make function work when the mouse not moving?
body: <pre><code>$(document).ready(function() {
      var score = 0;
  
      $("body").mousemove(function() {        
          score++;
          $("#result").val(score);
          console.log(score);
      });
  
   });
  </code></pre>
  
  <p>The score will increase every time when I move the mouse, but how should I add a function to decrease the score until 0 when the mouse is not moving?</p>