Skip to content

Instantly share code, notes, and snippets.

@djwglpuppy
djwglpuppy / gist:3874736
Created October 11, 2012 19:00
touchend event
isMobile = function() {
return /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent);
};
jQuery.fn.touchend = function(cb) {
return _.each(this, function(item) {
var isvalidend, newcb, touchevent, validend;
if (isMobile()) {
isvalidend = true;
validend = null;