Binding events is not removed at all. The poorly named bindWithEvent method has been removed, but that isn't related to this issue at all.
Your issue, basically, is that the context of `this` can be differently inside every single nested function you have. Personally, at this point, I'd create a variable above the request pointing to `this`, and then reference farther in. http://jsfiddle.net/seanmonstar/Rs2JT/1/ On Sun, Feb 13, 2011 at 9:22 PM, Steve Onnis <[email protected]> wrote: > You cant bind events now with 1.3 as it has been removed from the core. > You > need to implement it yourself again....yes stupid i know. Had this > discussion last week with them all > > -----Original Message----- > From: Dailce [mailto:[email protected]] > Sent: Monday, 14 February 2011 4:12 PM > To: MooTools Users > Subject: [Moo] Re: Bind and Event - What am I doing wrong? > > I think I figured it out. Does this seem right? > > > pagelinks.each(function(item){ > > item.addEvent('click', function(evv){ > > evv.preventDefault(); > > this.options.productPage = new URI(item).getData('page'); > > alert(this.options.productPage); > > }.bind(this));//BIND THIS TO THE ADDEVENT FUNCTION > }, > this);//PASS THIS TO THE EACH FUNCTION > >
