This commit is contained in:
Max Lynch
2013-08-24 20:46:31 -05:00
parent d9f1c23ee1
commit 9a660ccb00
10 changed files with 179 additions and 13 deletions

21
example/events.js Normal file
View File

@ -0,0 +1,21 @@
var logEvent = function(data) {
var e = document.getElementById('event-log');
var l = document.createElement('div');
l.innerHTML = 'EVENT: ' + data.type;
console.log(data.event);
e.appendChild(l);
}
window.FM.on('tap', function(e) {
console.log('GOT TAP', e);
logEvent({
type: 'tap',
event: e
});
});
window.FM.on('click', function(e) {
console.log('GOT CLICK', e);
logEvent({
type: 'click',
event: e
});
});