detect_swipe
    Overview
    Documentation
    Insights
    Code
    Contributors
    Dependencies
    Alternatives

detect_swipe

Simple jQuery extension for swipe events on touch devices

2.1.4  •  Updated 3 years ago  •  by Marc-André Lafortune  •  MIT License

jquery.detectSwipe

Gives easy access to left/right/up/down swipe events for iOS and other touch devices.

Based on Andreas Waltl’s jQuery TouchWipe.

How to use

$(".selector").on('swipeleft',  function(){ /*...*/ })
              .on('swiperight', function(){ /*...*/ })
              .on('swipeup',    function(){ /*...*/ })
              .on('swipedown',  function(){ /*...*/ });

This won’t have any effect on non-touch devices. You can rely on:

$.detectSwipe.enabled // true on touch devices, false otherwise

Global setting:

$.detectSwipe.threshold // The number of pixels your finger must move to trigger a swipe event.  Defaults is 20.
$.detectSwipe.preventDefault // Should touchmove events be prevented?  Defaults to true.

Popularity

Weekly Downloads
23
Stars
97

Maintenance

Development

Last ver 3 years ago
Created 3 years ago
Last commit 3 years ago
2 months between commits

Technology

Node version: 7.8.0
0 unpacked

Compliance

MIT License
OSI Approved
0 vulnerabilities

Contributors

5 contributors
Marc-Andre Lafortune
Maintainer, 23 commits, 3 merges
Works at Freelance
Jon Wu
1 commits, 1 PRs
Works at Paper Culture
tuelsch
1 commits, 1 PRs
Sascha Merkofer
1 commits
TNT-RoX
3 PRs
andi-itagent
1 PRs

Dependencies

Tags

touch
swipe
jquery
events
Ready for the next level?
Join Openbase's founding team to help us build the ultimate open-source app store, work with the latest technologies, and enjoy great culture, impact and autonomy
Openbase helps developers choose among and use millions of open-source packages, so they can build amazing products faster.
FacebookLinkedIn
© 2020 Devstore, Inc.