Jump to: navigation, search

JQuery Mouse Over and Out

From w3cyberlearnings

Contents

jQuery Mouse Over and Out

Use $(selector).hover(over,out) instead of using $.mouseover() and $.mouseout() function.

Syntax

$(selector).mouseover(function(){});

$(selector).mouseout(function(){});


Mouse over

When mouse move over the .sp3, it will display the alert('mouse over')

  $('.sp3').mouseover(function(){
                    alert('mouse over');
  });

Mouse out

When mouse moves out the .sp3, it will display the alert('mouse out')

  $('.sp3').mouseout(function(){
                    alert('mouse out');
   });

Related Links


jQuery Mouse Over and Out

Navigation
Web
SQL
MISC
References