<script src="jquery-1.9.1.js" type="text/javascript"></script>
<script type="text/javascript"> <br>$(function () { <br>$('img').click(function () { <br>$(this).animate({ left: '+=150px' }, 2000).animate({ left: '+=150px' }, 2000).animate({ top: '+=200px' }, 2000).animate({ left: '-=150px' }, 2000).animate({ left: '-=150px' }, 2000).animate({ top: '+=200px' }, 2000).animate({ left: '+=150px' }, 2000).animate({ left: '+=150px' }, 2000); <br>}) <br>//停止动画,当一个元素有一个动画队列时,停止的是当前动画,紧接着执行下一个动画 <br>$('#btnStop').click(function () { <br>$('img').stop(); <br>}) <br>$('#btnYanChi').click(function () { <br>$('img').delay(2000).hide(2000); <br>}) <br>}) <br></script>
![]() | | |
| | | |
| | | |










