Prevent Instant Click Event On Touch Devices - jQuery prevent-touch

File Size: 4.56 KB
Views Total: 1140
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Prevent Instant Click Event On Touch Devices - jQuery prevent-touch

prevent-touch is a lightweight yet sometimes useful jQuery plugin which prevents default tap/click events on specific touch-enabled devices using jQuery event.preventDefault() method. Great for CSS styled dropdowns/hover states.

Mobile devices supported:

  • iOS
  • iPhone
  • iPad
  • iPod
  • Android
  • Blackberry
  • Windows
  • Opera
  • Any


$ npm install prevent-touch --save

How to use it:

1. Insert the jQuery prevent-touch plugin's script after loading jQuery JavaScript library.

<script src="" 
<script src="prevent-touch.js"> </script>

2. Enable the plugin on the target element(s) and specify the device(s) on which you want to prevent the default click/tap event.

    ios : true,
    iphone : true,
    iPad : true,
    iPod : true,
    android : true,
    blackBerry : true, 
    opera : true,
    windows : true,
    any : true

This awesome jQuery plugin is developed by dj10dj100. For more Advanced Usages, please check the demo page or visit the official website.