You can use a combination of chain()
and delay()
to achieve the desired effect.
new Fx.Morph(testMorph, {
transition: 'back:out',
duration: 900,
link: 'chain'
}).start().chain(function(){
this.start.delay(2000,effect,{
//first
});
}).chain(function(){
this.start({
//second
});
});
The chain()
adds another effect at the end of the current one.
The first effect is simply start() with an empty effect, to provide context to our chain of events.
It is then chained to the delayed event, using the start.delay()
method (delay()
is a property of Function
).
This, in turn, is chained to your other effect.
See here.