Archive

Posts Tagged ‘JQuery’

jquery mouseover and mouseout event

June 18, 2011 Leave a comment

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: