Hello I have a carousel on my website and a sidebar. I want to open the sidebar with swipe control which i have implemented succesfully but my carousel is not working properly now.
I dont want to open the menu when i swipe the carousel so could anyone please help me with the code. Thank you in advance.
$(function test() { $("body").swipe({ swipe: function(event, direction, distance, duration) { if (direction == "right") { if (carousel is not siwiped) { $("body").removeClass("sidebar-toggled"); $(".sidebar").removeClass("toggled"); } } else if (direction == "left") { if (carousel is not swiped) { $("body").addClass("sidebar-toggled"); $(".sidebar").addClass("toggled"); } } }, }); });
Hello I have a carousel on my website and a sidebar. I want to open the sidebar with swipe control which i have implemented succesfully but my carousel is not working properly now.
I dont want to open the menu when i swipe the carousel so could anyone please help me with the code. Thank you in advance.
$(function test() { $("body").swipe({ swipe: function(event, direction, distance, duration) { if (direction == "right") { if (carousel is not siwiped) { $("body").removeClass("sidebar-toggled"); $(".sidebar").removeClass("toggled"); } } else if (direction == "left") { if (carousel is not swiped) { $("body").addClass("sidebar-toggled"); $(".sidebar").addClass("toggled"); } } }, }); });