ghooghe
6/11/2013 - 3:17 PM

Transfer click event to tap, only if not on a touch device

Transfer click event to tap, only if not on a touch device

// Transfer click event to tap, only if not on a touch device
if (!('ontouchend' in window)) {
  $(document).delegate('body', 'click', function(e) {
		$(e.target).trigger('tap');
	});
}