Okay i would like to add a class cfse_a
to an element #searchput
when the mouse is hovering over the element and then when the mouse is not hovering over the element then remove class cfse_a
.
Use hover
event with addClass
and removeClass
methods:
$("#searchput").hover(function() {
$(this).addClass("cfse_a");
}, function() {
$(this).removeClass("cfse_a");
});
DEMO: http://jsfiddle.net/G23EA/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With