From 8170e13607a5c0b882f39e75d4d0cf35b7b212a9 Mon Sep 17 00:00:00 2001 From: AkisYTB3 Date: Thu, 25 Jan 2024 21:07:34 +0100 Subject: [PATCH] testomg --- scripts/pages/user/main.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/pages/user/main.js b/scripts/pages/user/main.js index 23d0559..f07af3f 100644 --- a/scripts/pages/user/main.js +++ b/scripts/pages/user/main.js @@ -5,7 +5,7 @@ document.addEventListener('DOMContentLoaded', function () { // Initial styles for fade-in effect h1.style.opacity = '0'; h1.style.transform = 'translateX(-35px)'; - + h2.style.opacity = '0'; h2.style.transform = 'translateX(-35px)'; @@ -14,11 +14,13 @@ document.addEventListener('DOMContentLoaded', function () { void h2.offsetWidth; // Apply the fade-in effect - h1.style.transition = 'opacity 0.8s ease, transform 0.6s ease'; - h1.style.opacity = '1'; - h1.style.transform = 'translateX(0)'; + setTimeout(function () { + h1.style.transition = 'opacity 0.8s ease, transform 0.6s ease'; + h1.style.opacity = '1'; + h1.style.transform = 'translateX(0)'; - h2.style.transition = 'opacity 0.8s ease, transform 0.6s ease'; - h2.style.opacity = '1'; - h2.style.transform = 'translateX(0)'; + h2.style.transition = 'opacity 0.8s ease, transform 0.6s ease'; + h2.style.opacity = '1'; + h2.style.transform = 'translateX(0)'; + }, 100); });