Observing Dynamically loaded Elements with jQuery and Prototype
Both jquery and Prototype make it easy to attach Observers to dynamically loaded dom elements.
In Prototype:
document.observe('click', function(e, el) {
if (el = e.findElement('.foo')) {
// bar
}
});while in jQuery live does the job:
$(".foo").live("click", function(e) {
// bar
});