I’m trying to have a text change repetitively. It shall never be the same as long as the page has loaded. I understand that event listeners will listen for a specific event, whether it is a “click”, “onload”, etc. However, what about a event or some type of action were its just related to the idle website. While the user is staring at a screen, i’d like it to do some effect.
<a>Change me, constantly. Until user leaves the page.</a>
i would like that be change from 1 statement to the other. I’ve realize that creating an array that stores these statements but how can i make it so its constantly updating?
Nope you’re doing it right. This is very similar to a “heartbeat” where a site keeps checking back with the server to tell it that the user is still alive. It’s more common than you’d think.