var hammertime = new Hammer(document.body, {
enable: true,
recognizers: [
[Hammer.Swipe, { direction: Hammer.DIRECTION_HORIZONTAL }]
]
});
hammertime.on('swipeleft', function(ev) {
// hide menu
});
hammertime.on('swiperight', function(ev) {
// show menu
});