AllThingsSmitty/jquery-tips-everyone-should-know

On hover

emha opened this issue · 1 comments

emha commented

Don't want to create a pull request so I created an issue :)

$('.btn').hover(function () {
$(this).addClass('hover');
}, function () {
$(this).removeClass('hover');
});

should be

$('.btn').hover(function () {
$(this).toggleClass('hover');
});

emha commented

Oh, I saw the code wrong. I'am sorry :( Now I know what you want to do :)