You could do this...
Zepto(document).on('swipeRight', function(e) {
if ($(e.target).is(**slider-container**)) return;
if($('#search-container').hasClass('back-left'))
handleSideSearchMenu();
else if(!$(showLeft).hasClass('active'))
MyObj.handleSideMenu(showLeft);
}).on('swipeLeft', function(e){
if ($(e.target).is(**slider-container**)) return;
if($('#search-container').hasClass('to-right') && !$(showLeft).hasClass('active'))
handleSideSearchMenu();
else if($(showLeft).hasClass('active'))
MyObj.handleSideMenu(showLeft);
});
In the above code, e.target
is the DOM element that triggered the event, so you can use that to check for elements you want to ignore.
Without seeing the markup I can't be much more help. You'll need to replace **slider-container**
with something that identifies the element you want to ignore.