Smooth Scrolling jQuery
Tue Dec 08 2020 13:24:39 GMT+0000 (UTC)
Saved by
@Mindum
$('.btn').on('click', function (e) {
if (this.hash != '') {
e.preventDefault();
const hash = this.hash;
$('html, body').animate(
{
scrollTop: $(hash).offset().top,
},
800
);
}
});
content_copyCOPY
Comments