Javascript examples for jQuery Method and Property:mousemove
trigger the mousemove event for the selected elements:
<!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").mousemove(function(){ $("p").css("background-color", "lavender"); });//w w w .ja va2 s . c o m $("button").click(function(){ $("p").mousemove(); }); }); </script> </head> <body> <p>This is a paragraph.</p> <button>Trigger mousemove event</button> </body> </html>