title: Count from a number to a target number script and use it in multiple boxes
body: <h2>I found that on another topic:</h2>
  
  <pre><code>$({
      countNum: $('.skill-counter').text()
  }).animate({
      countNum: 90
  }, {
      duration: 2000,
      easing: 'linear',
      step: function () {
          $('.skill-counter').text(Math.floor(this.countNum) + 1 + ('%'));
      }
  });
  </code></pre>
  
  <p>What I am trying to change with this is to put this in a function and use it in multiple boxes with different count values.</p>
  
  <h2>What I have done so far:</h2>
  
  <pre><code>var count = function (counTo, divName) {
      this.counTo = 0;
      $(counTo).animate({
          counTo: counTo
      }, {
          duration: 2000,
          easing: 'linear',
          step: function () {
              $(divName).text(Math.floor(counTo) + 1 + ('%'));
          }
      });
  };
  
  count(90, 'box1');
  count(70, 'box2');
  count(50, 'box3');
  </code></pre>
  
  <p>It doesn't work and probably that's normal because it's totally wrong! So How can I do that?</p>