jQuery mouseover()
handle mouse over event
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"> </script>//from w w w . j a va2 s . c o m <script> $(document).ready(function(){ $("p").mouseover(function(){ $("p").css("background-color", "yellow"); }); $("p").mouseout(function(){ $("p").css("background-color", "lightgray"); }); }); </script> </head> <body> <p>Move the mouse pointer over this paragraph.</p> </body> </html>