I am trying to have text that is in an array that loops through the array and renders on the screen with the CSS animations and has a seconds delay through each change. My executable code will give an idea what I am trying to achieve
HTML
<div class="first">
<div class="vert-line"></div>
<p>Are you looking for a quick learner?</p>
</div>
<div class="second">
<div class="vert-line"></div>
<p>Someone who is ever evolving?</p>
</div>
<div class="third">
<div class="vert-line"></div>
<p>Someone who is strives to improve their knowledge?</p>
</div>
<div class="fourth">
<div class="vert-line"></div>
<p>Someone who loves problem-solving and finding solutions?</p>
</div>
<div class="fifth">
<div class="vert-line"></div>
<p>Someone who has the tenacity to succeed?</p>
</div>
JS
let first = document.querySelector(".first p")
let second = document.querySelector(".second p")
let third = document.querySelector(".third p")
let fourth = document.querySelector(".fourth p")
let fifth = document.querySelector(".fifth p")
let textArray =[first,second,third,fourth,fifth]
let textArrayShow = []
function AnimationTimer(){
for(let i =0; i < textArray.length; i++){
console.log(textArray[i])
}
textArray.forEach(() => {
setTimeout(5000)
});
}
AnimationTimer()
So the end result needs to be, it needs to animate that when it slides down it changes to the next text in the array and it needs to repeat itself over and over.
Its meant to be a selling point of the kind of person I am.