var events = {};events[this.options.labelEvent] = this.show.bind(this,
index);
new Element('div', { events: events });you can't use dot notation or variable substitution in object literal notation... On Tue, Oct 20, 2009 at 1:42 PM, Piotr Zalewa <[email protected]> wrote: > This is not the way you setup an object parameter (example: > http://mooshell.net/yzLmw/) > > If you want to assign dynamic event do it after creation of Element > new Element('div').addEvent( this.options.labelEvent: this.show.bind(this, > index) ); > > -- > London, UK >
