title: reset countdown on mousemove
body: <p>i´m trying since hours but i didn´t get a solution for this problem.</p>
  
  <p>how can i set the countdown to 10 again when the mouse is moving?
  here is the codepen link:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var timeout = null;
  
  $(document).on('mousemove', function() {
      if (timeout !== null) {
      }
  
      timeout = setTimeout(function() {
        var timer = 10;
        var interval = setInterval(function() {
         timer--;
        $('.timer').text(timer);
        if (timer === 0) clearInterval(interval);
        }, 1000);
          
      }, 100);
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.timer {
    position: relative;
    font-size: 40px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="timer"&gt;10&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>