// 平滑滚动到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
原文:http://www.cnblogs.com/Wen-yu-jing/p/3772092.html