Created
December 12, 2012 17:49
-
-
Save NeilJS/4269982 to your computer and use it in GitHub Desktop.
jQuery fix for click events in iOS
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
// Using Modernizr to detect mobile in this case. More specific for iOS may be better. | |
var event = (Modernizr.touch) ? "touchstart" : "click"; | |
$("#element").bind(event, function(e) { | |
// do it | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment