I am trying to convert a Prototype slide-show plugin to jQuery. The animation function is fairly simple an intuitive: fade-out visible slide, fade-in next slide, both animations start and stop at the same time. Here is the Prototype code which I have yet to fully understand:
fadeInOut: function (a, b) {
new Effect.Parallel(
[
new Effect.Fade(b, {sync: true}),
new Effect.Appear(a, {sync: true})
], {
duration: 1
}
);
}
I've written this jQuery equivalent:
var anim = function (a, b) {
// m_Locked = true
a.fadeOut(1000);
b.fadeIn(1000);
// m_Locked = false
};
I am wondering what does Effect.Parallel do and if there is a jQuery equivalent. I also need to set and clear a locked flag which i'll use to disable buttons while the animation is running... this does not seem to work.