Show:

Available since 3.7.0

The tap module provides a gesture events, "tap", which normalizes user interactions across touch and mouse or pointer based input devices. This can be used by application developers to build input device agnostic components which behave the same in response to either touch or mouse based interaction.

'tap' is like a touchscreen 'click', only it requires much less finger-down time since it listens to touch events, but reverts to mouse events if touch is not supported.

Example:

YUI().use('event-tap', function (Y) {
                                Y.one('#my-button').on('tap', function (e) {
                                    Y.log('Button was tapped on');
                                });
                            });