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);});

animate和scrollTop的使用,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!