Skip to content

Instantly share code, notes, and snippets.

@tilap
Last active August 29, 2015 14:10
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 tilap/9e8f9899426ddf5494bf to your computer and use it in GitHub Desktop.
Save tilap/9e8f9899426ddf5494bf to your computer and use it in GitHub Desktop.
Fastclick
<script type='application/javascript' src='/path/to/fastclick.js'></script>
<script type='application/javascript'>
window.addEventListener('load', function() {
new FastClick(document.body);
}, false);
</script>
// 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