Try looking at event delagation:
http://mootools.net/docs/more/Element/Element.Delegation
David walsh also has a good write up on how this works:
http://davidwalsh.name/mootools-event-delegation
Anton
On 27 Nov 2009, at 08:44, Jake <[email protected]> wrote:
I have a script that has the following event listener:
$(document.body).getElements('a.bookmark').addEvents({
'click': function(){
// Some code here.
}
});
It listens for clicks on <a> elements in a <div> that is dynamically
updated by an Ajax script.
The problem is that after the <div> is dynamically updated, the
listener no longer catches the clicks, unless / until the page is
reloaded.
Is this the expected behavior?