title: Slow JavaScript animation in Chrome
body: <p>i have a problem with the style manipulation of an HTML object in Chrome.</p>
  
  <p>Here is an example:</p>
  
  <pre><code>var a = document.createElement('div');
  
  a.style.position = 'absolute';
  a.style.display = 'block';
  a.style.top = '300px';
  a.style.left = '50px';
  a.style.height = '100px';
  a.style.width = '10px';
  a.style.backgroundColor = '#000000';
  a.style.zIndex = '200';
  
  a.aW = 10;
  
  var a2 = document.createElement('div');
  
  a2.style.position = 'absolute';
  a2.style.display = 'block';
  a2.style.top = '200px';
  a2.style.left = '50px';
  a2.style.height = '100px';
  a2.style.width = '10px';
  a2.style.backgroundColor = '#000000';
  a2.style.zIndex = '200';
  a2.id = 'a';
  
  a2.aW = 10;
  
  document.getElementsByTagName('body')[0].appendChild(a);
  document.getElementsByTagName('body')[0].appendChild(a2);
  
  var b = window.setInterval(function () {
      a.aW += 10;
      if (a.aW &gt; 1600) {
          window.clearInterval(b);
      }
      a.style.width = a.aW + 'px';
  }, 13);
  
  $('#a').animate({
      width: '1600'
  }, 2000, 'linear');
  </code></pre>
  
  <p>The object which is animated through the setInterval Function is sometimes working slowly if it is run on a normal website.
  The strange thing is, that the Object animated by jQuery runs smoothly oO.</p>
  
  <p>(Sorry for my bad English).</p>