Threaded View
-
29 Nov 2012 4:32 PM #1
Answered: Ext equivalent to the jQuery method .live()
Answered: Ext equivalent to the jQuery method .live()
Does such a thing exist or will I need to roll my own?
http://api.jquery.com/live/
Description: Attach an event handler for all elements which match the current selector, now and in the future.
-
Best Answer Posted by evant
You achieve it by using the delegate option:
http://docs.sencha.com/ext-js/4-1/#!...od-addListener
Code:Ext.getBody().on('click', function(){ console.log('You clicked foo'); }, null, { delegate: '.foo' });


Reply With Quote