Skip to content

Instantly share code, notes, and snippets.

@pec1985
Created September 23, 2014 00:31
Show Gist options
  • Select an option

  • Save pec1985/1a93c0c93aa1ff4683df to your computer and use it in GitHub Desktop.

Select an option

Save pec1985/1a93c0c93aa1ff4683df to your computer and use it in GitHub Desktop.

Revisions

  1. pec1985 created this gist Sep 23, 2014.
    20 changes: 20 additions & 0 deletions app.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    var win = Ti.UI.createWindow();
    var btn = Ti.UI.createButton({
    title: 'click me'
    });
    win.add(btn);
    win.open();

    btn.addEventListener('click', function () {
    Ti.API.info('First "click" event on the button fired!');
    });
    btn.addEventListener('click', function () {
    Ti.API.info('Second "click" event on the button fired!');
    });
    btn.addEventListener('click', function () {
    Ti.API.info('Third "click" event on the button fired!');
    });
    btn.addEventListener('click', function () {
    Ti.API.info('Fourth "click" event on the button fired!');
    });