That ":hover" will likely not be recognized by IE 6. There are a lot of users still using that browser. Try the following instead:
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script>
//cache the images first
var imgs=[];
imgs[imgs.length]=new Image();
imgs[imgs.length-1].src='images/numr.png';
imgs[imgs.length]=new Image();
imgs[imgs.length-1].src='images/num1.png';
imgs[imgs.length]=new Image();
imgs[imgs.length-1].src='images/num2.png';
imgs[imgs.length]=new Image();
imgs[imgs.length-1].src='images/num3.png';
$(document).ready(function(){
$('.imageButton').hover( hoverIn, hoverOut);
});
function hoverIn(){
$(this).attr('prevImage',$(this).attr('src')).attr('src','images/numr.png');
}
function hoverOut(){
$(this).attr('src', $(this).attr('prevImage') ).attr('prevImage','');
}
</script>
</head>
<body>
<input type="image" class="imageButton" src="images/num1.png" id="as">
<input type="image" class="imageButton" src="images/num2.png" id="ad">
<input type="image" class="imageButton" src="images/num3.png" id="af">
</body>
</html>
Reputation Points: 116
Solved Threads: 243
Veteran Poster
Offline 1,123 posts
since Dec 2007