jQuery Tutorial


jQuery Example


jQuery References


jQuery mouseenter() Event Reference


  jQuery Events References


Uses

jQuery mouseenter() Event Occurs when mouse enters in an element area.


Bind a Function to mouseenter() event

Defined function run when the mouseenter() event occurs on the selected elements.

Syntax

$(selector).mouseenter(function) 

jQuery mouseenter() events supported following parameters.

ParameterDescription
functionFunction is Optional parameter. Function define the ready to run when event occur.

Example

$(document).ready(function(){
  $("input").mouseenter(function(){
    $("input").css("background-color","#FFFF99");
  });
  $("input").mouseleave(function(){
    $("input").css("background-color","pink");
  });
});
</script>
Online Try This Code Your Self....   »

Trigger the mouseenter() event

Triggering the mouseenter() event for a selected elements.

Syntax

$(selector).mouseenter()

Example

<script type="text/javascript"> 
$(document).ready(function(){
  $("input").mouseenter(function(){
    $("input").css("background-color","#FFFF99");
  });
  $("input").mouseleave(function(){
    $("input").css("background-color","pink");
  });
  $("#btn1").click(function(){
    $("input").mouseenter();
  });  
  $("#btn2").click(function(){
    $("input").mouseleave();
  });  
});
</script>
Online Try This Code Your Self....   »

  jQuery Events References