87,907
社区成员
发帖
与我相关
我的任务
分享
<script type="text/javascript" >
$(function(){
var $comment=$("#comment");//变量放进来
$("#bigger").click(function(){
if(!$comment.is(":animated")){
if($comment.height()<500){//是height(),少了括号
$comment.animate({height: "+=50"},400);//是+=50,才会自增50高度,下面的也一样
}
}
});
$("#smaller").click(function(){
if(!$comment.is(":animated")){
if($comment.height()>50){
$comment.animate({height: "-=50"},400);
}
}
});
});
</script>