Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@enwin
Created December 14, 2012 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enwin/4286163 to your computer and use it in GitHub Desktop.
Save enwin/4286163 to your computer and use it in GitHub Desktop.
$('a').bind('touchstart touchend touchcancel click',function(e){
// prevent click on touch actions
e.preventDefault();
// stop script if touchstart, only execute the script on touchend (nicer)
e.type === touchstart && return
alert('here');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment