Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Mixing HTML Button and Sencha Touch

  1. #11
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,062
    Answers
    3976
    Vote Rating
    1391
      0  

    Default

    Quote Originally Posted by emprize View Post
    try something like this
    Code:
    listeners:{
    
    element : 'element',
    tap:function(e){
    var el = e.getTarget('button.mybutton');
    if(el){
    myaction();
    }
    }
    }
    You can make that even better:

    Code:
    listeners : {
        element  : 'element',
        delegate : 'button.mybutton',
        tap      : function() {
            //...
        }
    }
    The delegate event config can take a DOM selector and will then only fire the tap event when the tap happened on an element matching that selector
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  2. #12
    Sencha User
    Join Date
    Jun 2012
    Posts
    45
    Answers
    2
    Vote Rating
    0
      0  

    Default

    Even better, thank you. Feel free to make yourself Best Answer

Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •