animate和scrollTop的使用
时间:2014-06-13 13:30:08
收藏:0
阅读:253
// 平滑滚动到ola结果位置
var scrollHeight =
$("#wrap_div")[0].scrollHeight;
var curDivHeight =
$("#"+userResultId).height();
$("#wrap_div").animate({scrollTop:
(scrollHeight-curDivHeight+230)+"px"}, 500);
$this.animate({height: h}, 1000,function(){$("#wrap_div").animate({scrollTop: (scrollHeight-curDivHeight-180)+"px"}, 500);});
评论(0)