-
-
Save artberri/6da9f659b77b028e3caa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- For this example I include an external library to handle touch events --> | |
<script src="javascripts/jquery.touchwipe.js"></script> | |
<script> | |
$(window).touchwipe({ | |
wipeLeft: function() { | |
// Close | |
$.sidr('close', 'sidr-main'); | |
}, | |
wipeRight: function() { | |
// Open | |
$.sidr('open', 'sidr-main'); | |
}, | |
preventDefaultEvents: false | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks a lot. I have been trying to implement swipe with HammerJS, this small snippet does it for me!