Skip to content

Instantly share code, notes, and snippets.

@joemccann
Created November 30, 2011 18:56
Show Gist options
  • Save joemccann/1410294 to your computer and use it in GitHub Desktop.
Save joemccann/1410294 to your computer and use it in GitHub Desktop.
Normalize click handler
var clickType
function normalizeClick(){
try {
d.createEvent("TouchEvent")
clickType = 'touchend'
return true
}catch (e){
clickType = 'click'
return false
}
}
@joemccann
Copy link
Author

Anyone have a click/touch normalizer that works x-browser?

@joemccann
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment