这里是我的HTML单击实际元素,开始动画
<div id="test">There I dont want put button</div>
和我的CSS
#test { width: 300px; height: 100px; }
和脚本
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$("#test").animate({height:300},"slow");
});
});
</script>
我怎样才能激活此动画无使用按钮?我想点击div #test
并将其设置为300x300。我尝试使用链接和标签,但似乎点击处理程序只理解按钮单击。
看看[这个问题](http://stackoverflow.com/questions/7636103/jquery-animation-on-window-load-on-an-infinite-loop)就是你在找的东西。 – Alex 2012-03-04 14:44:59