title: Run jQuery after setInterval function is complete
body: <p>I have a basic count function and i wish to run some code only after the count function is complete. Is there a way of doing this simply?</p>
  
  <p>DEMO <a href="http://jsfiddle.net/vyN6V/243/" rel="nofollow">http://jsfiddle.net/vyN6V/243/</a></p>
  
  <p>Current Code   </p>
  
  <pre><code>    var number = 1500;
      var aValue = 300;
  
      function count(Item) {
          var current = aValue;
          Item.val(aValue += 1);
          if (current &lt; number) {
              setTimeout(function () {
                  count(Item)
              }, 0.1);
          }
      }
  
      count($(".input"));
      // code here should only run when count function is complete
  </code></pre>
  
  <p>I tried this, to no avail</p>
  
  <pre><code>    var number = 1500;
      var aValue = 300;
  
      function count(Item) {
          var current = aValue;
          Item.val(aValue += 1);
          if (current &lt; number) {
              setTimeout(function () {
                  count(Item)
              }, 0.1);
          }
      }
  
      count(function$(".input"){
        // code here should only run when count function is complete
     });
  </code></pre>