Answer the question
In order to leave comments, you need to log in
How to change the values to the opposite mirror?
const value = (scrollTop/trackLength).toFixed(2)
Where scrollTop is window.pageYOffset and trackLength is the total page height of the site. The values of value change as you scroll FROM 0 (scroll at the top of the screen) to 1 (scroll at the very bottom).
How to change the values to the opposite mirror? Those. when 0 i want 1, when 0.20 i want 0.80 and so on?
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