title: fade in/out hover by jQuery
body: <p>I'm trying to add a simple fade in/out effect to the buttons by jQuery but I'm a bit stuck with fading out. I use this code:</p>
  
  <pre><code>$('#header #menu li a').hover(function () {
    $(this).fadeOut(0).addClass('hover').fadeIn(300);
  },
  function () {
    $(this).fadeOut(0).removeClass('hover').fadeIn(0);
  });
  </code></pre>
  
  <p>It adds a hover class which defines a css background and fade the hover image in. But when I move a cursor out of the button, it simply disappears as normally, no fading out.</p>
  
  <p>Can you help me with this please?</p>
  
  <p>Thanks a lot for all replies</p>