La fonction de suggestion automatique permet d'affiner rapidement votre recherche en suggérant des correspondances possibles au fur et à mesure de la frappe.
function animateLetterOut(cw, i) { setTimeout(function() { cw[i].className = "letter out"; }, i * 80); }
function animateLetterIn(nw, i) { setTimeout(function() { nw[i].className = "letter in"; }, 340 + i * 80); }
function splitLetters(word) { var content = word.innerHTML; word.innerHTML = ""; var letters = []; for (var i = 0; i < content.length; i++) { var letter = document.createElement("span"); letter.className = "letter"; letter.innerHTML = content.charAt(i); word.appendChild(letter); letters.push(letter); }
wordArray.push(letters); }
changeWord(); setInterval(changeWord, 4000);
Thanks for any help in advance as I don't know a ton about javascript!
You need to move the script to the bottom of the page just before the closing </body> tag. You're trying to access style properties of an element that doesn't exist yet, because the element isn't on the page. Moving the js to the bottom, will ensure the elements are in the DOM (unless the element is built dynamically, but I don't think it is)
If this answer helped, please, mark as solved 😄
tim@belch.io | forms.belch.io | Design your own Beautiful HubSpot Forms; No coding necessary.
You need to move the script to the bottom of the page just before the closing </body> tag. You're trying to access style properties of an element that doesn't exist yet, because the element isn't on the page. Moving the js to the bottom, will ensure the elements are in the DOM (unless the element is built dynamically, but I don't think it is)
If this answer helped, please, mark as solved 😄
tim@belch.io | forms.belch.io | Design your own Beautiful HubSpot Forms; No coding necessary.