"you could also use bindWithEvent and pass the element as a parameter.
"
How would this work?
--------- example? -------
initialize: function() {
$$(elements).each(function(element){
element.addEvent('blur',
this.configureElement.bindWithEvent(this));
});
},
configureElement: function(element){
alert('the id is' + element.get('id'));
}
On Jan 7, 11:23 pm, nutron <[email protected]> wrote:
> you could also use bindWithEvent and pass the element as a parameter.
>
>
>
> On Wed, Jan 7, 2009 at 11:22 PM, Aaron Newton <[email protected]> wrote:
> > event.target
>
> > On Wed, Jan 7, 2009 at 11:12 PM, jiggliemon (via Nabble) <
> > [email protected]<ml-user%[email protected]>
> > > wrote:
>
> >> I'm porting a Magento template over to Mootools, and i've run into a
> >> little issue.
>
> >> Prototype has a ".element()" function where you can select the element
> >> that an event is attached to.
>
> >> --------- example -------
> >> initialize: function() {
> >> $$(elements).each(function(element){
> >> element.addEvent('blur', this.config.bind(this));
> >> });
> >> },
> >> config:function(event){
> >> //Here's your Prototype function
> >> var element = event.element();
> >> this.configureElement(element);
> >> },
> >> configureElement: function(element){
> >> alert('the id is' + element.get('id'));
> >> }
>
> >> So my question is, how do i select the element of which an event is
> >> bound to in mootools?
>
> >> ------------------------------
> >> View message @
> >>http://n2.nabble.com/Porting-Magento-over-to-Mootools-from-Prototype-...
> >> To start a new topic under MooTools Users, email
> >> [email protected]<ml-node%[email protected]>
> >> To unsubscribe from MooTools Users, click here< (link removed) >.
>
> -----
> The MooTools Tutorial: http://www.mootorial.comwww.mootorial.com
> Clientcide: http://www.clientcide.comwww.clientcide.com
> --
> View this message in
> context:http://n2.nabble.com/Porting-Magento-over-to-Mootools-from-Prototype-...
> Sent from the MooTools Users mailing list archive at Nabble.com.