Home > JQuery > jquery mouseover and mouseout event

jquery mouseover and mouseout event

Examples :Image change when mouse over and mouseout

<html>

<head>

<script type=’text/javascript>

jQuery(document).ready(function () {

jQuery(‘.yellow’).bind(‘mouseover’, yellow_mouseover)
jQuery(‘.yellow’).bind(‘mouseout’,  yellow_mouseout)

function yellow_mouseover()
{
jQuery(‘.yellow’).attr(“src”,”images/yellow.gif”);
}

function yellow_mouseout()
{
jQuery(‘.yellow’).attr(“src”,”images/yellow1.gif”);

}

});

</script>

</head>

<body>

<img class=’yellow’ src=’images/yellow1.jpg’>

</body>

</html>

Advertisements
Categories: JQuery Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: