title: Run mousedown event every 0.2s, until mouse up
body: <p>I am trying to consecutively add +1 to the value of a text input field when the user clicks a button.</p>
  
  <p>Simplified, my JQuery code is something like this:</p>
  
  <pre><code>$('#button').on({
   mousedown : function () {
   var value = $(this).val();
   $(this).val(value + 1);
   },
   mouseup : function () {
   //Some other stuff here
   }
  });
  </code></pre>
  
  <p>This works every time the user clicks the button. 
  What I want is if the user keeps the button pressed, the mousedown event to fire every 0.2s until he stops pressing (and than the mouseup event fires).</p>
  
  <p>I figure this should somehow be done with setTimeout() but I would be glad if someone showed me how. Thanks.</p>