We use XTemplates - lots of XTemplates. They are great for displaying read-only content. But have you ever added (Ext JS) listeners to DOM created via a template? Would y
Shamelessly modified version of MolecularMan's concept:
Ext.live = function (selector, event, handler) {
Ext.getBody().on(event, function(event, target){
handler.apply(Ext.get(target), arguments);
}, null, {
delegate: selector
});
};
Usage:
Ext.live('.myclass', 'click', function () {
this.fadeOut();
});