Skip to content

jockehewh/swiperjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

swiperjs

swiperjs is a custom event that gives you the direction of a swipe if it is longer than 50 pixels.

just include the script in your html and listen for the 'swipe' event

<script src="swiper.js"></script>
<script>
    window.addEventListener('swipe', (swipeEvent)=>{
        console.log(swipeEvent.detail)
    })
</script>

and enjoy the fun !

PS: swiper.js is listening for the event, to disable the log message comment the 19th line in the file.

About

mobile first swipe control

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published