title: Hold button -> repeat function
body: <p>I'm trying to achieve something which souldn't be hard to do, but everything I've tried so far hasn't worked.</p>
  
  <p>I have a function that changes a value every time I click a button, and what I want is: when I hold this button, the value should keep changing.</p>
  
  <p>This is what I've tried and hasn't worked, setInterval and setTimeout won't "wait" (the function get's called right away thousands of times and the website crashes):</p>
  
  <pre><code>    $('.buttonPlus').mousedown(function() {
          timeoutID =setTimeout(distribucionPorcentual($(this)),1000);
      }).bind('mouseup mouseleave', function() {
          clearTimeout(timeoutID);
      });
  </code></pre>
  
  <p>Any help will be greately appreciated. Thanks!</p>