<script src="jquery-1.9.1.js" type="text/javascript"></script>
<script type="text/javascript"><br> $(function () {<br> // $('img').click(function () {<br> // $('img').animate({ left: '-=200px' }, 2000).animate({ left: '-=200px' }, 2000)<br> // .animate({ left: '+=400px', top: '-=200px' }, 1).animate({ left: '-=200px' }, 2000).animate({ left: '-=200px' }, 2000)<br> // .animate({ left: '+=400px', top: '-=200px' }, 1).animate({ left: '-=200x' }, 2000).animate({ left: '-=200px' }, 2000)<br> // })<br> var i = 0; var c = 0;<br> $('img').click(function () {<br> if (c < 3) {<br> if (i == 2 & c == 0) { $('img').animate({ left: '+=400px', top: '-=200px' }, 1); c++ }<br> else if (i == 2 & c == 1) { $('img').animate({ left: '-=200px' }, 2000); c++ }<br> else if (i == 2 & c == 2) { $('img').animate({ left: '-=200px' }, 2000); c = 0; i++; }</script>
else if (i == 3 & c == 0) { $('img').animate({ left: '+=400px', top: '-=200px' }, 1); c++ }
else if (i == 3 & c == 1) { $('img').animate({ left: '-=200px' }, 2000); c++ }
else if (i == 3 & c == 2) { $('img').animate({ left: '-=200px' }, 2000); c++; }
else { $('img').animate({ left: '-=200px' }, 2000); i++; }
}
})
})
![]() |











