Skip to content
jQuery plugin to get swipe direction, distance and angle.
JavaScript
Find file
Latest commit 75821e1 @szeko szeko Merge pull request #1 from noogn/master
Changed fat arrow functions to regular functions
Failed to load latest commit information.
README.md Changed fat arrow functions to regular functions
bower.json Added bower.json
swipe.jquery.js Remove timeout

README.md

swipe.jquery.js

A jQuery plugin to get swipe direction, distance, angle and speed on devices with or without touch support.

Usage

$(document).swipe()
    .on('swipeStart', function(e) {
        console.log('Swipe start', e.swipe);
    })
    .on('swipeMove', function(e) {
        console.log('Swipe move', e.swipe);

        // Log mouse position
        console.log(e.originalEvent.pageX, e.originalEvent.pageY);
    })
    .on('swipeEnd', function(e) {
        console.log('Swipe end', e.swipe);
    });
Something went wrong with that request. Please try again.