From 965ca1df3112b7303857f6c903ce5bc8b5d18f36 Mon Sep 17 00:00:00 2001 From: Aditya Kumar <121501207+Aditya0950@users.noreply.github.com> Date: Mon, 8 Apr 2024 22:16:24 +0530 Subject: [PATCH] Update script.js --- script.js | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/script.js b/script.js index 55a6b12..06a826c 100644 --- a/script.js +++ b/script.js @@ -27,6 +27,10 @@ container.addEventListener("mousemove", function (details) { let h1Pen = document.querySelector("#Page1Container span svg"); +setTimeout(function () { + h1Pen.style.transform = "rotate(0deg) scale(1)"; +}, 8700) + h1Pen.addEventListener("mouseover", function () { h1Pen.style.transform = "rotate(-30deg) scale(0.85)"; }); @@ -51,9 +55,23 @@ navtalk.addEventListener("mouseleave", function () { let page2 = document.querySelector("#Page2"); page2.addEventListener("mouseenter", function () { - rightPart.forEach(function (Page2part) { - Page2part.style.left = "0%"; - }) + rightPart[0].style.left = "0%"; + + setTimeout(function () { + rightPart[1].style.left = "0%"; + }, 500) + + setTimeout(function () { + rightPart[2].style.left = "0%"; + }, 700) + + setTimeout(function () { + rightPart[3].style.left = "0%"; + }, 900) + + setTimeout(function () { + rightPart[4].style.left = "0%"; + }, 1100) }) let rightPart = document.querySelectorAll("#Right .Part");