> **jQuery UI Touch Punch is a small hack that enables the use of touch events on sites using the jQuery UI user interface library.**
_[Visit the official Touch Punch website](http://touchpunch.furf.com)._
Currently, [jQuery UI](http://jqueryui.com/) user interface library does not support the use of touch events in their widgets and interactions. This means that the slick UI you designed and tested in your desktop browser will fail on most, if not all, touch-enabled mobile devices, because jQuery UI listens to mouse events—mouseover, mousemove and mouseout—not touch events—touchstart, touchmove and touchend.
That's where jQuery UI Touch Punch comes in. Touch Punch works by using [simulated events](https://developer.mozilla.org/en/DOM/document.createEvent) to map [touch events](http://www.html5rocks.com/en/mobile/touch/) to their mouse event analogs. Simply include the script on your page and your touch events will be turned into their corresponding mouse events to which jQuery UI will respond as expected.
As I said, Touch Punch is a hack. It [duck punches](http://en.wikipedia.org/wiki/Monkey_patch) some of jQuery UI's core functionality to handle the mapping of touch events. Touch Punch works with all basic implementations of jQuery UI's interactions and widgets. However, you may find more complex cases where Touch Punch fails. If so, scroll down to learn how you can file and/or fix issues.
This code is dual licensed under the MIT or GPL Version 2 licenses and is therefore free to use, modify and/or distribute, but if you include Touch Punch in other software packages or plugins, please include an attribution to the original software and a link to [this Touch Punch website](http://touchpunch.furf.com/).
## Using Touch Punch is as easy as 1, 2…
Just follow these simple steps to enable touch events in your jQuery UI app:
**Caution**: jQuery UI was deprecated from core because it is no longer
actively maintained, and has been marked “End of Life” by the OpenJS
Foundation. It is not recommended to depend on jQuery UI in your own
code, and instead to select a replacement solution as soon as possible.
## Instructions
1. Download this module and the jQuery UI module.
2.[Download Jquery Touch Punch](https://github.com/furf/jquery-ui-touch-punch) library and place it in the libraries folder (<drupalroot>/libraries). You need the full library which is easily available from the Github repo (the full path to the required js file should be: <drupalroot>/libraries/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js).
3. Install module the [usual way](https://www.drupal.org/documentation/install/modules-themes/modules-8).
4. Change any references in your theme or module from
`core/jquery.ui.touch-punch` to `jquery_ui_touch_punch/touch-punch`
$output.='<p>'.t('Drupal 8 includes jQuery UI in core, however it is no longer actively maintained and has been marked deprecated. This module provides the jQuery UI Touch Punch library for any themes and modules that require it.').'</p>';
$output.='<p>'.t('For more information about the deprecation of jQuery UI, see this <a href=":change-record">change record</a>',[':change-record'=>'https://www.drupal.org/node/3067969']).'</p>';
$output.='<p>'.t('Visit the <a href=":project_link">jQuery UI Touch Punch project page</a> on Drupal.org for more information on this module.',[':project_link'=>'https://www.drupal.org/project/jquery_ui_touch_punch']).'</p>';