//---hello textbox on pome page (hero-section) config function animate_hello() { const texts = ["Namaste! ๐Ÿ™", "Hello! ๐Ÿ‘‹", "Konnichiwa! ๐Ÿ˜„", "Anyeonghaseyo! ๐Ÿ˜Š", "Hola! ๐Ÿ˜ƒ", "Bonjour! ๐Ÿ˜„", "Zdravstvuyte! ๐Ÿ™‚", "Marhabaan! ๐Ÿ˜Š", "Olรก! ๐Ÿ˜ƒ", "Salve! ๐Ÿค "]; const textContainer = document.getElementById("helloContainer"); let currentIndex = 0; function animateText() { textContainer.innerHTML = texts[currentIndex].split(' ').map(word => `${word}`).join(' '); currentIndex = (currentIndex + 1) % texts.length; setTimeout(() => { animateText(); }, 4000); } animateText(); } if (document.getElementById("helloContainer")) { animate_hello(); } //---hoverAnimatedContainer animation config const animate_card_mouseover_effect = e => { const { currentTarget: target } = e; const rect = target.getBoundingClientRect(), x = e.clientX - rect.left, y = e.clientY - rect.top; target.style.setProperty("--mouse-x",`${x}px`); target.style.setProperty("--mouse-y",`${y}px`); } if(document.querySelectorAll(".hoverAnimatedContainer")){ for(const card of document.querySelectorAll(".hoverAnimatedContainer")){ card.onmousemove = e => animate_card_mouseover_effect(e); } }