Skip to content

git-antonyuk/SwipeEvents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 

Repository files navigation

Swipe Events helper

Init sample

const el = document.querySelector('.el')
const swipeEvents = new SwipeEvents(el)

function prev () {
  console.log('prev')
}

function next () {
  console.log('next')
}

el.addEventListener('swipeRight', prev)
el.addEventListener('swipeLeft', next)

Destroy sample

el.removeEventListener('swipeRight', this.prev)
el.removeEventListener('swipeLeft', this.next)
swipeEvents.removeEventListener()

About

Swipe Events helper ๐Ÿ› 

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published