jQuery: code stops working after adding delay() and removeClass()
<p>Here's my code...</p>

<pre><code> $('nav ul li').hover(function() {

    $(this).addClass('hoverIn');


  },
  function() {

    $(this).addClass('hoverOut');


  });
</code></pre>

<p>which works fine.</p>

<p>But when I add delay() and removeClass() it doesn't work, as follows...</p>

<pre><code> $('nav ul li').hover(function() {

    $(this).addClass('hoverIn').delay(800).removeClass('hoverIn');


  },
  function() {

    $(this).addClass('hoverOut').delay(800).removeClass('hoverOut');


  });
</code></pre>

<p>Am I doing something wrong here?</p>

<p>Any help would be greatly appreciated. Thanks.</p>
