How do I make elements that are loaded via ajax, adopt the events associated with the same class on mootools 1.11?
As far as I know, in jQquery, if your ajax respons
Perhaps something like this might do what you're looking for? Though I'm not sure if it'll work with 1.11.
Element.implement({
addLiveEvent: function(event, selector, fn){
this.addEvent(event, function(e){
var t = $(e.target);
if (!t.match(selector)) return false;
fn.apply(t, [e]);
}.bindWithEvent(this, selector, fn));
}
});
$(document.body).addLiveEvent('click', 'a', function(e){ alert('This is a live event'); });