$( "#list li:eq(0)" ).bind('mouseenter focus', function(event) {
jQuery("#logo img").css('top', '-132px');
console.log( event.type, " :: ", this.id );
}).bind('blur mouseleave', function(event) {
jQuery("#logo img").css('top', '-41px');
console.log( event.type, " :: ", this.id );
});
This piece of jQuery works great with the mouse over but not with the tab key over!
Have you encounter a similar problem?
I have tried .bind to fire both event and still not working!
if fires the event on mouseenter but nothing in focus!
mouseenterandmouseleavehave nothing to do with keyboard events, and are not fired when an element gains keyboardfocus.To have your code fire on both
mouseenterandfocus, this is a bit closer: