title: Add a class then do something after class has been added
body: <p>Hey guys i am working on a slider where i have to add a class with transform property and once the class is added fully and the animation is complete add or remove another class.
  Now this is code i did but it didn't work.</p>
  
  <pre><code>    $('.backgroundImage').addClass('anim', function(){
   $('.backgroundImage').removeClass('anotherClass');
  </code></pre>
  
  <p>Here i am trying to add a class to <code>.backgroundImage</code> called <code>anim</code> and once is fully attached remove the second class <code>.anotherClass</code>
  the idea is to do this when one class is fully attached then only other gets removed and not simultaneously.
  Please tell me where i am doing wrong.
  thanks.</p>