日期:2014-05-16 浏览次数:20457 次
$(function(){
$("#case_more").click(function(){
$("#case").animate({"height":"650px"},600),
$("#case").animate({"height":"350px"},600);
});
});
<style>
#case{background-color:yellow;width:100px;height:100px}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
var i=0;
$("#case_more").click(function(){
i++;
if(i%2!=0){
$("#case").animate({"height":"650px"},600);
}else{
$("#case").animate({"height":"100px"},600);
}
});
})
</script>
<input type="button" id="case_more" value="change"/>
<div id="case">
</div>