From 072f012398e448682f6d1cb0d981bdbb5e46263c Mon Sep 17 00:00:00 2001 From: tradam Date: Tue, 18 Nov 2025 23:37:40 +0000 Subject: progress --- js/parallax-header.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js') 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); } -- cgit v1.2.3