jQuery Tutorial


jQuery Example


jQuery References


jQuery mouseover() Event Reference


  jQuery Events References


Uses

jQuery mouseover() Event Occurs when mouse pointer moves over an element.


Bind a Function to mouseover() event

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

Syntax

$(selector).mouseover(function) 

jQuery mouseover() events supported following parameters.

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

Example

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

Trigger the mouseover() event

Triggering the mouseover() event for a selected elements.

Syntax

$(selector).mouseover()

Example

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

  jQuery Events References