This is a special effect to allow to combine more than one core effect into a parallel effect. It’s the only effect that doesn’t take an element as first parameter, but an array of subeffects.
作用 :联合多个效果核心效果的特殊作用。唯一一个效果没有把element作为第一个参数,而是一系列效果。
Syntax
Example
[url]http://wiki.script.aculo.us/scriptaculous/show/Effect.Parallel[/url]
作用 :联合多个效果核心效果的特殊作用。唯一一个效果没有把element作为第一个参数,而是一系列效果。
Syntax
new Effect.Parallel([array of subeffects], [options]);
Example
new Effect.Parallel(
[ new Effect.Move(element, {sync: true, x: 20, y: -30, mode: 'relative'}),
new Effect.Opacity(element, {sync: true, to: 0.0, from: 1.0 } ) ],
{ duration: 0.5,
afterFinish: function(effect) { Element.hide(effect.effects[0].this.parentNode); }
}
);
[url]http://wiki.script.aculo.us/scriptaculous/show/Effect.Parallel[/url]