Threaded View

  1. #1
    Ext JS Premium Member
    Join Date
    Jun 2009
    Location
    Eastern WA, US
    Posts
    78
    Vote Rating
    0
    jnicora is on a distinguished road

      0  

    Default 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.

  2. 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'
    });

Thread Participants: 1