jeudi 10 septembre 2020

jQuery if page is loaded and time passed

Heyo,

I just want a simple if statement that checks if the whole page is loaded window.loaded and if a sertan amount of seconds have passed time.passed. I don't want to start the time.passed counter when the window is loaded ... i just want an if statement that checks if window && time is true.

Is that possible?

Here's my incorrect dream Code

if (window.loaded == true && time.passed == 3000) {
    // do something
}

I guess I have to work with variables and I'm fine with that ... I just don't know how to make it work for me.

Aucun commentaire:

Enregistrer un commentaire