We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
scrollY
pageYOffset
1 parent 8bfbbfd commit 506c82eCopy full SHA for 506c82e
src/libs/ParallaxScrollListener.js
@@ -45,7 +45,7 @@ import {
45
const prevScrollY = scrollY;
46
47
// Save current scroll
48
- scrollY = window.scrollY;
+ scrollY = window.pageYOffset; // Supports IE 9 and up.
49
50
// direction
51
scrollDown = scrollY > prevScrollY;
@@ -132,7 +132,7 @@ import {
132
const windowHeight = window.innerHeight || html.clientHeight;
133
const elHeight = el.offsetHeight;
134
const elWidth = el.offsetWidth;
135
- const scrollY = window.scrollY;
+ const scrollY = window.pageYOffset;
136
137
// NOTE: offsetYMax and offsetYMin are percents
138
// based of the height of the element. They must be
0 commit comments