So I want the buttons to change style when mouse is down, and return to previous when it goes up. I have this code:
$('#divMenu > #menu li a').mousedown(function(){
$(this).css({
'font-size': '25px',
'color': 'red'
});
}).mouseup(function(){
$(this).css({
'font-size': '30px',
'color': 'black'
});
});
The problem is, that when I have mouse down, but take it away of my object and not release immediately, font size and color stays 25px and red. What should I do to pass that?
EDIT: JsFiddle here: http://jsfiddle.net/h64Uz/