Jquery :animate反复执行的动画可以利用函数的回调

<html>
<head>
<script type="text/javascript" src="/jquery/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
function aniDiv(){
$("#box").animate({300},"slow");
$("#box").animate({100},"slow",aniDiv);
}
aniDiv();
$(".btn1").click(function(){
$(":animated").css("background-color","blue");
});
});
</script>
<style>
div
{
background:#98bf21;
height:40px;
100px;
position:relative;
margin-bottom:5px;
}
</style>
</head>
<body>
<div></div>
<div >Mark animated element</button>
</body>
</html>