Javascript examples for jQuery Method and Property:mouseout
Attach a function to the mouseout event:
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("p").mouseover(function(){ $("p").css("background-color", "yellow"); });/*from w w w. j av a 2 s.c om*/ $("p").mouseout(function(){ $("p").css("background-color", "lightgray"); }); }); </script> </head> <body> <p>Move the mouse pointer over this paragraph.</p> </body> </html>