Created
November 30, 2011 18:56
-
-
Save joemccann/1410294 to your computer and use it in GitHub Desktop.
Normalize click handler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var clickType | |
function normalizeClick(){ | |
try { | |
d.createEvent("TouchEvent") | |
clickType = 'touchend' | |
return true | |
}catch (e){ | |
clickType = 'click' | |
return false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Anyone have a click/touch normalizer that works x-browser?