jQuery mouseenter() Method - CodingTag

jQuery mouseenter()

0 923

  • This jQuery function is worked when the mouseenter event occurs or it binds a function to run when a mouseenter event occurs.
  • A mouseenter event happens when a mouse pointer is entered into the selected element.
  • Most of the time this method is used together with mouseleave() method.

Related Topics:

jQuery keyup
jQuery keydown

jQuery mouseenter()




If you want to trigger a function in it, the syntax will be:

$(selector). mouseenter(function);

Parameter description:

  • function: It represents the function to run when the mouseenter event is triggered. It is optional.


<title>jQuery Example</title>
<script type = "text/javascript"
i = 0;

$("body").css("background", "pink");
$(this).css("background", "yellow");
$(this).css("font-size", "20px");

$("body").css("background", "white");
$(this).css("background", "white");
$(this).css("font-size", "16px");


<h2>jQuery Mouseenter event Example</h2>
<p>When you enter the mouse, the color will change. </p>


When you enter the mouse in the paragraph,

Best WordPress Hosting


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price

Leave a Reply

    Waiting for your comments