<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#but1").click(function () {
$("#dv").animate({ height: 250 }, "slow");
$("#dv").animate({ width: 250 }, "slow");
$("#dv").queue(function () {
$(this).css("background-color", "orange");
$(this).dequeue();
});
$("#dv").animate({ height: 100 }, "slow");
$("#dv").animate({ width: 75 }, "slow");
});
$("#but2").click(function () {
$("#dv").clearQueue();
});
});
</script>
</head>
<body>
<p><button id="but1">Start</button>
<button id="but2">Stop</button></p>
<div id="dv" style="background:blue;height:75px;width:100px;position:relative">
</div>
</body>
</html>
|