summaryrefslogtreecommitdiffhomepage
path: root/js/parallax-header.js
diff options
context:
space:
mode:
authortradam <[email protected]>2025-11-18 23:37:40 +0000
committertradam <[email protected]>2025-11-18 23:37:40 +0000
commit072f012398e448682f6d1cb0d981bdbb5e46263c (patch)
tree388689a338820c60ad93ff0c61fcaba258773943 /js/parallax-header.js
parent5ec6e44935e7c979fd718d6aa2c7a5308da0ee54 (diff)
downloadmalcz-wordpress-theme-dev.tar.gz
malcz-wordpress-theme-dev.zip
progressdev
Diffstat (limited to 'js/parallax-header.js')
-rwxr-xr-xjs/parallax-header.js1
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);
}