This question has already been answered:
I can not understand. how in js to do the execution interval for several objects.
For example, there is such an array
var data = { data1:{ increment:1, innerTo:"#elem" }, data2:{ increment:20, innerTo:"#elem2" }, dataN:{ increment:400, innerTo:"#elemN" } }; It is dynamic, that is, data can be added and deleted. How to do with a given time interval bypassing this list and for each given perform certain actions that are listed there?
for example, for data1, every second, increase the value by 1 and insert it into the element. For the second, increase every second by 2 and insert it into another element. And such a list is subject to change.
setIntervaltried? - Dmytryk