jquery effect

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
<script type="text/javascript" src="jquery.js"></script>
<script>
function hello() {
$('#myImage').fadeOut('slow',function(){
$(this).attr('src','2.jpg')
})
$('#myImage').fadeIn('slow')
}
</script>
<body>
<img src="1.jpg" id="myImage" />
<button onclick="hello();">click</button>
</body>