My background image animation relies on the hover callback to return to its original state. However, when I quickly move the mouse over the links, the hovered state sticks. I suspect that I am moving the mouse off before the first animation completes, causing the callback not to register.
Is there a more foolproof way to implement this function?
$('.nav li a').hover(function() {
$(this).addClass('hovered', 300);
}, function() {
$(this).removeClass('hovered', 300);
});
(This code utilizes a BGimg plugin to support the speed parameter on add/removeClass.)
You can test it here: McPherson Industries