title: jQuery - add a class and remove it after 500ms
body: <p>I want to add a class and remove it after 500 miliseconds. It does not work with delay(). To give an simple example I do it here with a background-color:</p>
  
  <p><a href="http://codepen.io/anon/pen/gnaer" rel="nofollow">code pen</a></p>
  
  <p>jQuery</p>
  
  <pre><code>$('.box').click(function(){
  
   $('.box').addClass("bg1").delay(500).removeClass("bg1");
  });
  </code></pre>