Answer the question
In order to leave comments, you need to log in
Why does SmoothScroll.js work crookedly?
The site has SmoothScroll.js for smooth scrolling to the desired anchor, but there is a strange bug in its work - the first time you click on the anchor, there is a transition to the anchor + about 100px of offset is added down. But if you click on the same link again, the screen will move higher (as if those added 100px are removed).
Page
The first time you click on "Example from practice" the page occupies the following position:
When you click on the same menu item again, this position:
Settings in SmoothScroll.js itself twisted, but did not find anything related to the page offset.
In what cases the scroll works fine:
- if you remove all js-files from the page
- if you remove the top menu from the layout
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question