Javascript examples for jQuery Method and Property:bind
Bind mouse over and out 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").bind("mouseover mouseout", function(){ $("p").toggleClass("intro"); });// w w w. j a v a2 s . c o m }); </script> <style> .intro { font-size: 150%; color: red; } </style> </head> <body> <p>Hover the mouse pointer over this paragraph.</p> </body> </html>