title: ExtJS Animate Counter from 0 to N
body: <p>I have a simple <code>Ext.Panel</code> item with number:</p>
  
  <pre><code>{
      cls: 'tableRightBorder',
      html: '&lt;p class="someValue" onload="animateCounter()"&gt;20&lt;/p&gt;',
      //border: '1px solid',
      width: '100%',
      height: '100%'
  }
  </code></pre>
  
  <p>And I want to make animation from 0 to 20 in this case. I've tried with onload event and this function:</p>
  
  <pre><code>function animateCounter() {
      var i = 0;
  
      var inv = setInterval(function() {
          if (i &lt; 100)
              document.getElementsByClassName('someValue').innerHTML = ++i;
          else
              clearInterval(inv);
      }, 3000 / 100);
  }
  </code></pre>
  
  <p>But this does not work. Could anyone tell me please why it is not working and how can I solve it?</p>