Skip to content

doomhz/Doom-Swipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Doom Swipe

Swipe event handler for touch devices.

Example:

new DoomSwipe( document.getElementById('swipeable'), { onSwipe: function (swipeType) { alert(swipeType); } } );

All options example:

new DoomSwipe(
  document.getElementById('swipeable'),
  {
    threshhold: 20,
    timeout:    250,
    onSwipe:    function (swipeType, horizontalSwipedDistance, verticalSwipedDistance) {
      alert(swipeType);
    }
  }
);

Trigger a swipe event in Selenium:

selenium.getEval("document.getElementById('swipeable').swipe('LEFT')");

With Capybara:

page.execute_script("document.getElementById('swipeable').swipe('LEFT')")

or you can use the SwipeHelpers:

When /^I swipe the page to the right$/ do
  swipe("RIGHT")
end

About

Swipe event handler for touch devices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published