--
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mootools-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Ok so it confirm what I thought there is no "built-in" easy way except doing a function and calling it with the two events.
Included in the library is also a file called Delegator which is essentially the same thing except for events. For example, let's say you have a predictable UI pattern of having a link that, when clicked, it hides a parent element. Rather than writing that code each time:
document.body.addEvent("click:a.hideParent", function(e, link){
e.preventDefault();
link.getParent().hide();
});
You register this pattern with Delegator and now you just do:
<a data-trigger="hideParent" data-hideparent-options ="{'target': '.someSelector'}">Hide Me!</a>