I am using an OWL Carousel for my slider.
What I am trying to do is slide 2 items when next previous is clicked.
So its sliding to every second item still showing the second item during the transmission.
I have tried to work it out with CSS but no success.
Here is my basic setup
$("#owl-demo").owlCarousel({
navigation : true, // Show next and prev buttons
slideSpeed : 600,
paginationSpeed : 400,
singleItem:true,
// "singleItem:true" is a shortcut for:
// items : 2
// itemsDesktop : false,
// itemsDesktopSmall : false,
// itemsTablet: false,
// itemsMobile : false
});
Any help much appreciated.
Thanks in advance.
The above answers are helpful but they are incomplete.
Replace Line 558 in owl.carousel.js:
Replace line 559 in owl.carousel.js with:
This will make the carousel scroll by 2 when you click next but you still need to account for when a user clicks on the prev button. The Following will do just that
Replace line 581 in owl.carousel.js with:
Now you need to account for an odd number of items in your carousel so it will click all the way through every item.
Add this code on line 582 directly under the code in the previous step:
I hope this help.
http://jsfiddle.net/k0nn7yw5/107/
This helped me.
In the current version of Owl Carousel (1.3.2), find the "owl.carousel.js" file and scroll to line #558. The line will read:
Change the last number to "2" so that it reads:
Save the file, and that should make the slider move by two items.
You can easily add
https://owlcarousel2.github.io/OwlCarousel2/docs/api-options.html
Don't change plugin code, you just need to intialize carousel with slideBy option as mentioned below.