Created
February 20, 2014 14:38
-
-
Save lifedraft/9115070 to your computer and use it in GitHub Desktop.
Execute some action on click/touchend after the second tap on an element.
This file contains 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
if Modernizr.touch | |
_active = null | |
$context.bind 'touchend', (event) -> | |
_active = null | |
links = $context.find('.contents-item a').bind 'touchend', -> | |
if _active != this | |
_active = this | |
return false | |
if _active == this | |
// {execute my code} | |
return false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment