UX improvement

This commit is contained in:
sairaj mote 2023-07-17 02:13:02 +05:30
parent 8f2b6b5c3f
commit a809ba93a7

View File

@ -2240,6 +2240,7 @@
duration: 300,
easing: 'ease'
})
getRef(pageId).parentNode.scroll(0, 0)
const targetListItem = document.querySelector(`.list__item[href="#${pageId}"]`)
targetListItem.classList.add('list__item--active')
if (firstLoad && window.innerWidth > 640 && targetListItem.getBoundingClientRect().top > getRef('side_nav').getBoundingClientRect().height) {