how to use hover css using jquery code example
Example 1: jquery hover
$( "td" ).hover(
() => {
$(this).addClass("hover");
},
() => {
$(this).removeClass("hover");
}
);
$( "td" )
.mouseover( () => {
$(this).addClass("hover");
})
.mouseout( () => {
$(this).removeClass("hover");
}
);
$( "td" )
.mouseenter( () => {
$(this).addClass("hover");
})
.mouseleave( () => {
$(this).removeClass("hover");
}
);
Example 2: jquery mouse hover method
$("#p1").hover(function(){
alert("You entered p1!");
},
function(){
alert("Bye! You now leave p1!");
});