плавная свиток до вершины jQuery
window.scrollTo({top: 0, behavior: 'smooth'});
Lokesh003
window.scrollTo({top: 0, behavior: 'smooth'});
window.scroll({
top: 0,
left: 0,
behavior: 'smooth'
});
$("my-element").click(function () {
$("html, body").animate({
scrollTop: 0
}, 1000)
})
$('#DIV_ID').scrollTop(0);
window.scrollTo({top: 0, behavior: 'smooth'});
reference : https://stackoverflow.com/questions/15935318/smooth-scroll-to-top
$("a[href='#top']").click(function() {
$("html, body").animate({ scrollTop: 0 }, "slow");
return false;
});