Created
September 23, 2014 00:31
-
-
Save pec1985/1a93c0c93aa1ff4683df to your computer and use it in GitHub Desktop.
Events on buttons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!'); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment