jQuery mouseenter() Method Last Updated : 11 Jul, 2025 Suggest changes Share Like Article Like Report The jQuery mouseenter() method is an inbuilt method which works when mouse pointer moves over the selected element. Syntax: $(selector).mouseenter(function)Parameters: This method accepts single parameter function which is optional. It is used to specify the function to run when the mouseenter event is called. Example 1: This example illustrates the mouseenter() method in jQuery. HTML <!DOCTYPE html> <html> <head> <title>The mouseenter Method</title> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> <!-- jQuery code to show the working of this method --> <script> $(document).ready(function () { $("p").mouseenter(function () { $("p").css("background-color", "green"); }); }); </script> <style> body { width: 300px; padding: 40px; height: 30px; border: 2px solid green; font-weight: bold; font-size: 20px; } </style> </head> <body> <!-- move over this paragraph and see the change --> <p>Welcome to GeeksforGeeks!</p> </body> </html> Output: Example 2: In this example, a pop-up will come out when we move the mouse over the paragraph. HTML <!DOCTYPE html> <html> <head> <title>The mouseenter Method</title> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> <!-- jQuery code to show the working of this method --> <script> $(document).ready(function () { $("p").mouseenter(function () { alert("Mouse moved over this paragragh"); }); }); </script> <style> body { width: 300px; padding: 40px; height: 30px; border: 2px solid green; font-weight: bold; font-size: 20px; } </style> </head> <body> <!-- move over this paragraph and pop-up will come --> <p>Welcome to GeeksforGeeks!</p> </body> </html> Output: Related Articles: jQuery | data() with ExamplesjQuery | addBack() with Examples K kundankumarjha Follow Article Tags : JQuery jQuery-Events jQuery-Methods Explore jQuery Tutorial 8 min read Getting Started with jQuery 4 min read jQuery Introduction 7 min read jQuery Syntax 2 min read jQuery CDN 4 min read jQuery SelectorsJQuery Selectors 5 min read jQuery * Selector 1 min read jQuery #id Selector 1 min read jQuery .class Selector 1 min read jQuery EventsjQuery Events 4 min read jQuery bind() Method 2 min read jQuery blur() Method 1 min read jQuery change() Method 2 min read jQuery EffectsjQuery animate() Method 2 min read jQuery clearQueue() Method 2 min read jQuery delay() Method 2 min read jQuery HTML/CSSjQuery addClass() Method 2 min read jQuery after() Method 1 min read jQuery append() Method 2 min read jQuery TraversingjQuery | Traversing 4 min read jQuery add() method 1 min read jQuery addBack() Method 2 min read My Profile ${profileImgHtml} My Profile Edit Profile My Courses Join Community Transactions Logout Like