From fb07a70e5f9f3609a6f0eccb09f96aeb7cf88163 Mon Sep 17 00:00:00 2001 From: rodude123 Date: Sun, 1 Aug 2021 12:14:17 +0100 Subject: [PATCH 1/2] added timeout before animating next text in the typewriter animation. Signed-off-by: rodude123 --- dist/js/main.js | 2 +- src/js/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/js/main.js b/dist/js/main.js index 321865b..8f6aa2e 100644 --- a/dist/js/main.js +++ b/dist/js/main.js @@ -1 +1 @@ -const scrollLimit=150;window.onscroll=()=>{document.body.scrollTop>=150||document.documentElement.scrollTop>=150?document.querySelector("nav").classList.add("scrolled"):document.querySelector("nav").classList.remove("scrolled");let e="";document.querySelectorAll("section").forEach((t=>{const o=t.offsetTop;window.pageYOffset>=o-60&&(e=t.getAttribute("id"))})),document.querySelectorAll("nav ul li a").forEach((t=>{t.classList.remove("active"),t.href.includes(e)&&""!==e?t.classList.add("active"):""===e&&document.querySelector("nav ul li a").classList.add("active")}))},document.addEventListener("DOMContentLoaded",(()=>{var e=["full stack developer","web designer","student","gamer","drummer"];function t(e,o,n){o