Before with jQuery I could do a chained animation with a delay between like so:
$("#element").delay(45).animate({ }, 45)
.delay(45).animate({ }, 45)
.delay(45).animate({ }, 45);
Now since the update to v1.6.1 instead of doing what it did previously, it now skips to the last animation. Ignoring the previous statements. I know I can do an oncomplete callback for each animation but that just get's messy:
$("#element").delay(45).animate({ }, 45, function(){
$("#element").delay(45).animate({ }, 45, function(){
$("#element").delay(45).animate({ }, 45);
})
})
Does anyone know how I can accomplish this in a simple clean way?
Edit: added a Fiddle for you to play with
I wrote this piece of code a while ago, perhaps it's useful for you? (sorry for the messy indenting)
Here is the second way as requested. I post it in another answer, because it is more complex, and perhaps less beautiful. To play with it see: http://jsfiddle.net/LMptt/1/
Usage: use a string with + or - to indicate a relative timestamp. The order matters for relative timestamps (relative to the previous action that is). Use "+0" or '-0' for the same timestamp as the previous one. Absolute timestamps (integers) can be put anywhere in the list.