I am trying to get fastclick.js to work for me in order to get rid of the delay of 300ms when clicking. For some reason, this is not working for me. I will show all of my steps taken in order to reproduce the problem. I would truly appreciate someone to tell me where I've gone wrong. Thank you!
Download fastclick.js by clicking "download zip"
Extract zip file into my project
Add
<script type='application/javascript' src='fastclick.js'></script>
Then, add the following code:
if ('addEventListener' in document) { document.addEventListener('DOMContentLoaded', function() { FastClick.attach(document.body); }, false); }
- Finally, run the project, and notice that the console says "FastClick is not defined", and that the 300ms problem still persists
Thank you for your time. I would appreciate if someone went through the steps of including fastclick in javascript code.