Created
December 5, 2015 18:00
-
-
Save igorkulman/f7c559775ef3e57906ed to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<script src="https://hammerjs.github.io/dist/hammer.min.js"></script> | |
<script type="text/javascript"> | |
window.onload = function() { | |
var hammertime = new Hammer(document.getElementById("text")); | |
hammertime.get('swipe').set({ direction: Hammer.DIRECTION_HORIZONTAL }); | |
hammertime.on('swipeleft', function (ev) { | |
window.external.notify('left'); | |
}); | |
hammertime.on('swiperight', function (ev) { | |
window.external.notify('right'); | |
}); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment