Dev/jQuery
jQuery simple rollover
프리지앙
2012. 7. 24. 21:00
jQuery 를 이용해서 간단하게 롤오버 이미지를 만들어 봤다.
<!-- jQuery Rollover -->
<script type="text/javascript">
jQuery(document).ready(function() {
$("img.rollover").hover(
function() {
this.src = this.src.replace("_off","_on");
},
function() {
this.src = this.src.replace("_on","_off");
}
);
});
</script>