I think the problem is your not actually passing a function to chain. Your
anonymous function is valid, however when using delay it returns a
javascript timeout id. Not a function.

I believe the correct syntax would be:

tween.start('opacity', 0.5, 1).chain(function(){
  function(){
     stoerer.setStyle('display', '');
  }.delay(1000);
});

I would try and avoid such code as the readability of your code is reduced.
If you only have a single instance that's probably ok. If you have multiple
you might end up refactoring in the following manner. (using a class
structure).

tween.start('opacity', 0.5,
1).chain(this.endDelayEffect.bind(this,this.stoerer));

//method in classs
endDelayEffect : function(element){
     this.restoreDefault.delay(1000,this,[element,'display']);
}

// method in class
restoreDefault : function(el,prop){
    $(el).setStyle(prop','');
}

Now the code end chain effect can easily be recycled for any element or
effect.



On Tue, Oct 14, 2008 at 3:44 AM, eskimoblood <[EMAIL PROTECTED]> wrote:

>
> Thanks, but what's wrong with my solution. I thought I can chain every
> function and delay() will return a function. So what's the problem?
>
> On 13 Okt., 18:21, nutron <[EMAIL PROTECTED]> wrote:
> > http://clientside.cnet.com/docs/Class.Extras/Chain.Wait
> >
> > On Mon, Oct 13, 2008 at 6:35 AM, eskimoblood <
> > [EMAIL PROTECTED]<[EMAIL PROTECTED]>
> <[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> >
> >
> >
> >
> > > wrote:
> >
> > > To: ''. Its the best way when you set it to 'none' before and you
> > > don't know if it's block, inline or inline-block in the css, cause it
> > > will use the rule of the css style. This works very well and has
> > > nothing to do with the error.
> >
> > > On 13 Okt., 14:39, "Iván N Paz" <[EMAIL PROTECTED]<
> http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1328787&i=0>>
> > > wrote:
> > > > ???
> >
> > > > >> stoerer.setStyle('display', '')
> >
> > > > You are setting the 'display' property, to what???
> >
> > > ------------------------------
> > >  View message @
> > >http://n2.nabble.com/Delay-in-chains-tp1325073p1328787.html
> > > To start a new topic under MooTools Users, email
> > > [EMAIL PROTECTED]<[EMAIL PROTECTED]>
> <[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> >
> > > To unsubscribe from MooTools Users, click here< (link removed) >.
> >
> > -----
> > The MooTools Tutorial:  http://www.mootorial.comwww.mootorial.com
> > CNET Clientside:  http://clientside.cnet.comclientside.cnet.com
> > --
> > View this message in context:
> http://n2.nabble.com/Delay-in-chains-tp1325073p1329389.html
> > Sent from the MooTools Users mailing list archive at Nabble.com.
>

Reply via email to