Mouseout not firing with fast movement over li elements

Mouseout not firing with fast movement over li elements

Hello, 

I have some simple code to add and remove a class when an li element is hovered.

  1. $("#nav li").hover(
  2. function(event)  {
  3. $(this).addClass("hovered");
  4. },
  5. function (event)  {
  6. $(this).removeClass("hovered");
  7. }
  8. );
The hovered class just adds a background image.  When I quickly hover over the list, sometimes the background image gets stuck so it seems like the "hovered" class never gets removed.  Does anybody have any ideas?  Thanks.