Let’s say I have this markup:
First paragraph 8条回答 北荒 (楼主) 2020-12-08 03:56 This code will avoid dependencies on other plugins and allow you to have it on any element. $('html, body').animate({ scrollTop: $("#newP").offset().top }, 500); 0 讨论(0) 查看其它8个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
First paragraph
This code will avoid dependencies on other plugins and allow you to have it on any element.
$('html, body').animate({ scrollTop: $("#newP").offset().top }, 500);