Image Rollover tutorial use jQuery

<!DOCTYPE html> 
<html dir="ltr" lang="en-US">
<head>
<meta charset="UTF-8" />
<title>A Simple jQuery Image Rollover</title>


<script src="http://code.jquery.com/jquery-1.4.4.min.js" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready(function() {
$("img.rollover").hover( 
function() { this.src = this.src.replace("_off", "_on"); 
}, 
function() { this.src = this.src.replace("_on", "_off"); 
});
}); 
</script>

</head>
<body> 

<a href="#"><img src="imageOne_off.png" class="rollover" /></a> 
<br />
<a href="#"><img src="imageTwo_off.png" class="rollover" /></a>

</body>
</html>

Comments

Popular posts from this blog

Text Smooth Scrolling Marquee use jQuery