setInterval(updateAircoState, 5000); does not fire updateAircoState() [closed]
setInterval(updateAircoState, 5000); does not fire updateAircoState() [closed] I'm trying to build a webserver on an ESP8266 using jQuery and bootstrap. This is my first go at jQuery and bootstrap (and Javascript for that matter). This project is inspired by this blog: "https://github.com/projetsdiy/ESP8266-Webserver-Tutorials". ======Update============ What I have found out after lots of Trail&Error is that I don't know how to start an interval-timer after the document is fully loaded. Also found out that setInterval(<function>, <time>) need to be assigned to a var like setInterval(<function>, <time>) var Timer_updateAirco = setInterval(updateAircoState, 5000); var Timer_updateAirco = setInterval(updateAircoState, 5000); And clearing the timer is like clearInterval(Timer_updateAirco); clearInterval(Timer_updateAirco); What I need to know is how to start an interval timer, executing a function, after the full load of the document. All help...