OMG queues are so complicated!
I have been trying to get the hang of queues all day and am no better off than when I started.
I even have tried simplify a queue example:
- var rootElement = $('body');
- var array = Array(1, 2, 3, 4, 5, 6, 7, 8, 9);
- for (var i = 0; i <= array.length - 1; i++) {
- rootElement.delay(1000).queue(function() {
- console.log(i);
- });
- }
The expected result is for the log to output the value of "i" every 1000 milliseconds... However this is not the case... Its like delay gets greedy and just skips ahead and processes everything.
Please what is going on here?