Last active
August 29, 2015 14:10
-
-
Save tilap/9e8f9899426ddf5494bf to your computer and use it in GitHub Desktop.
Fastclick
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
<script type='application/javascript' src='/path/to/fastclick.js'></script> | |
<script type='application/javascript'> | |
window.addEventListener('load', function() { | |
new FastClick(document.body); | |
}, false); | |
</script> |
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
// Browserified use of fastclick | |
'use strict'; | |
/* global document */ | |
// Remove 300ms delay on touch devices. | |
if ('addEventListener' in document) { | |
document.addEventListener('DOMContentLoaded', function() { | |
var attachFastClick = require('path/to/fastclick'); | |
attachFastClick(document.body); | |
}, false); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment