Skip to content

Instantly share code, notes, and snippets.

@artberri
Created February 20, 2013 19:43
Show Gist options
  • Save artberri/6da9f659b77b028e3caa to your computer and use it in GitHub Desktop.
Save artberri/6da9f659b77b028e3caa to your computer and use it in GitHub Desktop.
<!-- 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>
@ashpriom
Copy link

Thanks a lot. I have been trying to implement swipe with HammerJS, this small snippet does it for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment