title: Animate and add class at the same time
body: <p>I'm trying to add a class with <code>top</code> and <code>left</code> properties for animation, but the <code>div</code> just shifts to the added class attribute without animating.</p>
  
  <pre class="lang-css prettyprint-override"><code>#myClass.move {
      top:100px;
      left:100px; 
  }     
  </code></pre>
  
  <p>The goal is to have the animation happen right when the class is added and animate based on the properties of the added class.</p>
  
  <pre><code>var shiftTop = parseInt($(".move").css("top")); 
  var shiftLeft = parseInt($(".move").css("left")); 
  
  $("#myClass").addClass("move").animate({top: "-="+shiftTop, left: "-="+shiftLeft}, 1000, function() {});
  </code></pre>
  
  <p>Is this possible?</p>