$('#main').bind('doScroll', function() {
$(this).animate({scrollTop: ($("a[name='comment']", this).offset().top - $(this).offset().top + $(this).scrollTop())}, 500, '');
});
jquery 滚动条自动至其子节点位置方法
最新推荐文章于 2022-04-14 15:39:00 发布
$('#main').bind('doScroll', function() {
$(this).animate({scrollTop: ($("a[name='comment']", this).offset().top - $(this).offset().top + $(this).scrollTop())}, 500, '');
});