events:
\'click\' : \'select\'
When using this event on Mobile Safari the event gets triggered twice when touched. Is this a known bug or some
Using coffeescript, I'd do the following, I don't ever find a reason to bring in modernizer when every mobile device these days is really a touch device, I mean when was the last time you had to really support something that didn't?
window.isTouchDevice = (/android|webos|iphone|ipod|ipad|blackberry|iemobile/i.test(navigator.userAgent.toLowerCase()) )
events: ->
for k, v of this when /click/.test(k) and isTouchDevice
mobileKey = k.replace('click','touchstart')
events[ mobileKey ] = v
delete events[ k ]
return events
Coffeescript reads better for these type of list comprehensions imho.