I’m using Hammer.js which seems to work great and does mention that I can limit horizontal and vertical direction but I can’t seem to get it to disable vertical swipe. Basically I have an off canvas navigation that I’d like to use only horizontal swipe to reveal.
(function ($) {
var $sw = $('#left-content');
$sw.on('swipe', function (event) {
event.preventDefault();
$('#ns-tool-bar, #left-content').toggleClass('slide');
});
}(jQuery));
You can use event.direction
Something like
should work