You could use setTimeout(function(){dosomething}, timeout), btw. add console.log(‘something’) to see if the functions are actually executed.
btw. if you’re using interval remember you might need to cancel it if you dont want it running forver, you could as well use recurring function (a function calling itself) with some condition on when to do processing or now.
btw2. every time you create interval assign it to some variable or something so you can cancel it!
3
solved How do I delay an execution in Javascript?