title: jQuery reset setInterval timer
body: <p>My Jquery:</p>
  
  <pre><code>function myTimer() {
      var sec = 15
      var timer = setInterval(function() { 
      $('#timer').text(sec--);
      if (sec == -1) {
        clearInterval(timer);
        alert('done');
       } 
      }   , 1000);
  
  }
  
  $("#knap").click(function() {
      myTimer();
  });
  
  $("#reset").click(function() {
  // set timer to 15 sec again.. 
  });
  </code></pre>
  
  <p>I want the timer to be reset when clicked on #reset. </p>