Make buttons more touch friendly

fix #1416
This commit is contained in:
Ruud
2013-05-18 23:37:49 +02:00
parent 1570132a55
commit 65fbd38105
3 changed files with 36 additions and 4 deletions
@@ -30,6 +30,12 @@ var CouchPotato = new Class({
History.addEvent('change', self.openPage.bind(self));
self.c.addEvent('click:relay(a[href^=/]:not([target]))', self.pushState.bind(self));
self.c.addEvent('click:relay(a[href^=http])', self.openDerefered.bind(self));
// Check if device is touchenabled
self.touch_device = 'ontouchstart' in document.documentElement;
if(self.touch_device)
self.c.addClass('touch_enabled');
},
getOption: function(name){