title: jQuery Counter Begins to Increment on Scroll but Won't Stop at Max Value
body: <p>I have a counter on my page that is using the following code:</p>
  
  <pre><code>$(window).scroll(function(){    
  if ($(window).scrollTop() &gt; 1400) {
      var max = 67;
      incCounter();
      $('#counter').fadeIn(800);
      }
  
      function incCounter() {
        var currCount = parseInt($('#counter').html());
        $('#counter').html(currCount+1);
        if (currCount+1 != max) {
          setTimeout(incCounter, 20);
        }
  }
  }
  </code></pre>
  
  <p>It starts at 0 and then continues without stopping at the maximum value. How do I get it to do so?</p>