Last active
September 19, 2017 21:51
-
-
Save mikeriley131/4e6ba02d12031f2c4b117c5f0b5dc1aa to your computer and use it in GitHub Desktop.
Overcome the need to double-tap on a button with :hover:before or :hover:after on iOS
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
var styledLink = document.querySelectorAll('.button-link'), | |
i; | |
for (i = 0; i < styledLink.length; ++i) { | |
styledLink[i].addEventListener('touchend', function(e) { | |
window.location = this.attr('href'); | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment