Le mardi 8 décembre 2009 10:07, T.J. Crowder a écrit :

> I assume in your real code, that ends with `]`, not with `)` as above?
> As above, it's a syntax error.
>
> > this._navButtons.invoke("_opacity", {'from': 0,
> >                                      'to': 1,
> >                                      'duration':1});

Oh, yes, my real code is correct...

> Do your button instances have a function called `_opacity` (with the
> underscore)? I'm not a scripty-head and maybe I shouldn't be posting,
> but the effect is called Effect.Opacity, and usually when scripty
> mixes effects in as element methods, it's the name of the effect with
> an initial lower case letter, so wouldn't that just be `opacity`?

Ok, I see the problem: here, _opacity() is a global function, not a 
this._navButtons element method...

I want to use the Effect.Opacity effect; what is the best way to implement 
this? Should I bind my _opacity() function to the buttons, using methodize?

-- 
   Frédéric

--

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.


Reply via email to