title: Jquery Insert Element, then do css Animation via Class Change - does not work
body: <p>I want to insert an element via "insertAfter". Afterwards I want to add a Class, to trigger a css animation.   </p>
  
  <p>When Im doing this with a Time Out it works:</p>
  
  <p><strong>First Method (with Timeout)</strong> </p>
  
  <pre><code>$content.insertAfter($("#2"));
  setTimeout(function(){
      $content.addClass("blue"); 
  }, 100);
  </code></pre>
  
  <p>But it does not work when I'm adding the Class directly after inserting the element:</p>
  
  <p><strong>Second Method (without Timeout)</strong> </p>
  
  <pre><code>$content.insertAfter($("#2")).addClass("blue"); 
  </code></pre>
  
  <p>Is there another solution? I dont want to use a Time Out Function.</p>
  
  <p>I have made a fiddle here: <a href="http://jsfiddle.net/b2eybnoy/" rel="nofollow">http://jsfiddle.net/b2eybnoy/</a></p>