Hello! I found a slide script, and it gives support to move the images vertically and horizontally. In case I put 2 buttons for the user to choose and make the exchange ... when I click in vertical or horizontal it works normal, but when one of the two is selected and the other is switched, the 2 is running. How do I do when I click on one another to stop?
The slide site: link
<li><a href="#!" id="horizontal">Horizontal</a></li>
<li><a href="#!" id="vertical">Vertical</a></li>
$("#vertical").click(function(){
var swiper = new Swiper('.swiper-container', {
direction: 'vertical',
zoom: true,
scrollbar: {
el: '.swiper-scrollbar',
hide: true,
},
});
});
$("#horizontal").click(function(){
var swiper = new Swiper('.swiper-container', {
zoom: true,
scrollbar: {
el: '.swiper-scrollbar',
hide: true,
},
});
});