title: Reset jquery setTimeout after second Click on Button
body: <p>I got a problem that wastes more and more time. Now I want to ask you guys to help me out. I really think it's not a big thing but I can't find the solution:</p>
  
  <p>I have two code snippets, both really similar:</p>
  
  <pre><code>$(function () {
  
      $('.plus--article').on('click', function () {
          var $qty = $(this).closest('form').find('input[name="sQuantity"]');
          var currentVal = parseInt($qty.val());
          if (!isNaN(currentVal)) {
              $qty.val(currentVal + 1);
  
              $('.change-quantity--form').submit(function (e) {
                  var form = this;
                  e.preventDefault();
                  var timeout = setTimeout(function () {
                      $.overlay.open();
                      form.submit();
                  }, 2000);
              });
          }
      });
  
      $('.minus--article').on('click', function () {
          var $qty = $(this).closest('form').find('input[name="sQuantity"]');
          var currentVal = parseInt($qty.val());
          if (!isNaN(currentVal) &amp;&amp; currentVal &gt; 0) {
              $qty.val(currentVal - 1);
              window.clearTimeout(timeout);
  
              $('.change-quantity--form').submit(function (e) {
                  var form = this;
                  e.preventDefault();
                  setTimeout(function () {
                      $.overlay.open({
                          closeOnClick: false
                      });
                      form.submit();
  
                  }, 2000);
              });
          }
      });
  
  });
  </code></pre>
  
  <p>I just want to reset the timeout after a click on one of the buttons. </p>