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.
1 parent b1825eb commit 9b33caaCopy full SHA for 9b33caa
093-creative portfolio/script.js
@@ -72,7 +72,7 @@ function init() {
72
current = pageNumber;
73
isAnimating = false;
74
}
75
- document.addEventListener("wheel", throttle(scrollChange, 1500));
+ document.addEventListener("wheel", scrollChange);
76
77
function scrollChange(e) {
78
if (isAnimating) return;
@@ -119,18 +119,4 @@ function init() {
119
});
120
121
122
-// avoid multiple firing
123
-function throttle(func, limit) {
124
- let inThrottle;
125
- return function () {
126
- const args = arguments;
127
- const context = this;
128
- if (!inThrottle) {
129
- func.apply(context, args);
130
- inThrottle = true;
131
- setTimeout(() => (inThrottle = false), limit);
132
- }
133
- };
134
-}
135
-
136
init();
0 commit comments