diff options
| author | tradam <[email protected]> | 2025-11-18 23:37:40 +0000 |
|---|---|---|
| committer | tradam <[email protected]> | 2025-11-18 23:37:40 +0000 |
| commit | 072f012398e448682f6d1cb0d981bdbb5e46263c (patch) | |
| tree | 388689a338820c60ad93ff0c61fcaba258773943 /js/parallax-header.js | |
| parent | 5ec6e44935e7c979fd718d6aa2c7a5308da0ee54 (diff) | |
| download | malcz-wordpress-theme-dev.tar.gz malcz-wordpress-theme-dev.zip | |
progressdev
Diffstat (limited to 'js/parallax-header.js')
| -rwxr-xr-x | js/parallax-header.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/js/parallax-header.js b/js/parallax-header.js index c4ce1fc..52990f8 100755 --- a/js/parallax-header.js +++ b/js/parallax-header.js @@ -13,6 +13,7 @@ document.addEventListener("scroll", () => { function animate() { currentPercent += (targetPercent - currentPercent) * tweenSpeed; + currentPercent = Math.max(Math.min(targetMax, currentPercent), targetMin); document.documentElement.style.setProperty('--scroll-percent', currentPercent + '%'); requestAnimationFrame(animate); } |
