UX improvement
This commit is contained in:
parent
8f2b6b5c3f
commit
a809ba93a7
@ -2240,6 +2240,7 @@
|
|||||||
duration: 300,
|
duration: 300,
|
||||||
easing: 'ease'
|
easing: 'ease'
|
||||||
})
|
})
|
||||||
|
getRef(pageId).parentNode.scroll(0, 0)
|
||||||
const targetListItem = document.querySelector(`.list__item[href="#${pageId}"]`)
|
const targetListItem = document.querySelector(`.list__item[href="#${pageId}"]`)
|
||||||
targetListItem.classList.add('list__item--active')
|
targetListItem.classList.add('list__item--active')
|
||||||
if (firstLoad && window.innerWidth > 640 && targetListItem.getBoundingClientRect().top > getRef('side_nav').getBoundingClientRect().height) {
|
if (firstLoad && window.innerWidth > 640 && targetListItem.getBoundingClientRect().top > getRef('side_nav').getBoundingClientRect().height) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user