title: Fade in / fade out background color of an HTML element with Javascript (or jQuery)
body: <p>I have a table whose row needs to be highlighted &amp; then cleared. I'm using <a href="http://getbootstrap.com/css/#tables-contextual-classes" rel="nofollow noreferrer">contextual classes</a> to color the table rows (not a necessary requirement). The javascript part is given below. How can I animate i.e. fadeIn / fadeOut the coloring of rows using javascript / jQuery / Bootstrap. The code below instantly adds &amp; removes the color.</p>
  <pre><code>$('tr').eq(1).addClass('success');
  
  setTimeout(function(){
      $('tr').eq(1).removeClass('success');
  },2000);
  </code></pre>
  <p><a href="http://jsfiddle.net/5NB3s/" rel="nofollow noreferrer">http://jsfiddle.net/5NB3s/</a></p>
  <p>P.S. Trying to <strong>avoid</strong> the <strong>jQuery UI</strong> route here <a href="https://stackoverflow.com/questions/967815/how-do-you-fade-in-out-a-background-color-using-jquery">How do you fade in/out a background color using jquery?</a></p>