jquery animation - when do they finish?
Posted
by
Naor
on Stack Overflow
See other posts from Stack Overflow
or by Naor
Published on 2012-11-26T22:56:53Z
Indexed on
2012/11/26
23:03 UTC
Read the original article
Hit count: 167
I have two jquery animations one by other:
books.animate({ left: left1 }, {
duration: this.slideDuration,
easing: this.easing,
complete: complete
});
laptops.animate({ left: left2 }, {
duration: this.slideDuration,
easing: this.easing,
complete: complete
});
I want the animations to run simultanusly so I use {queue: false}
:
books.animate({ left: left1 }, {
duration: this.slideDuration,
easing: this.easing,
queue: false,
complete: complete
});
laptops.animate({ left: left2 }, {
duration: this.slideDuration,
easing: this.easing,
queue: false,
complete: complete
});
But now the completed callback called twice! How can I know exactly when does the both animations are done?
© Stack Overflow or respective owner