💄 add page comment counter click event.

This commit is contained in:
elkan1788
2023-06-23 22:06:42 +08:00
parent a4f496b796
commit d44d4c2a79
3 changed files with 16 additions and 1 deletions

View File

@@ -59,11 +59,13 @@ NexT.utils = {
},
slidScrollBarAnime: function (targetId, easing = 'linear', duration = 500) {
const targetObj = document.getElementById(targetId);
window.anime({
targets: document.scrollingElement,
duration: duration,
easing: easing,
scrollTop: targetId == '' ? 0 : document.getElementById(targetId).getBoundingClientRect().top + window.scrollY
scrollTop: targetId == '' || !targetObj ? 0 : targetObj.getBoundingClientRect().top + window.scrollY
});
},