I am facing an issue with the code I have written to change the image source on mouse hover. While it does change the image src, the effect is quite jerky and abrupt. Is there a way to slow down the animation effect?
<script>
$(document).ready(function(){
$("#image").hover(function(){
$(this).attr("src","images/pic2.png")
}, function(){
$(this).attr("src","images/pic1.jpg")
});
});
</script>
</head>
<body>
<img id="image" src="images/pic1.jpg">
</body>
EDIT
http://jsfiddle.net/MKuvn/