Native-like tapping for touch apps

FastClick is a simple, easy-to-use library for eliminating the 300ms delay between a physical tap and the firing of a click event on mobile browsers. The aim is to make your application feel less laggy and more responsive while avoiding any interference with your current logic.

For more information, see this blog post or the official repository on GitHub.

Installation instructions

  • Install Libraries API 2.x
  • Download fastclick.js and place it in sites/all/libraries/fastclick/fastclick.js:
    mkdir -P sites/all/libraries/fastclick
    cd sites/all/libraries/fastclick/
    wget https://raw.github.com/ftlabs/fastclick/master/lib/fastclick.js
  • Install and enable this module

When using Drush, a development version of the library will be automatically downloaded when you enable the module. Command drush fastclick-download is also available.

How to use

By default the fastclick behaviour will be in effect in every page of your website.
If you want to attach the library only when you want, set the fastclick_enable_everywhere variable to FALSE. See also Using Libraries API 2.x (as a module-developer).

Note that you can still keep the old click behaviour in specific DOM elements, adding to them the needsclick class. See https://github.com/ftlabs/fastclick for more details and instructions.

Project Information

Downloads