In certain case i want to start the owl carousel from >3 item i.e carousel by defult shows item from 3rd number.. i have seen the documentation their is no such customization option available.How i can achieve this.
In certain case i want to start the owl carousel from >3 item i.e carousel by defult shows item from 3rd number.. i have seen the documentation their is no such customization option available.How i can achieve this.
Share Improve this question edited May 6, 2014 at 16:08 Erik Philips 54.6k11 gold badges131 silver badges156 bronze badges asked Apr 28, 2014 at 7:11 Ammar Hayder KhanAmmar Hayder Khan 1,3354 gold badges22 silver badges49 bronze badges3 Answers
Reset to default 10in own carousel-2
:
owl.owlCarousel({
startPosition: 2
});
There's jumptTo
method on it, you can call it right after creating the own carousel :
$(document).ready(function() {
var owl = $("#owl-demo").owlCarousel({
autoPlay: 3000, //Set AutoPlay to 3 seconds
items : 4,
itemsDesktop : [1199,3],
itemsDesktopSmall : [979,3]
});
// Now move the carousel to the third item.
owl = $("#owl-demo").data('owlCarousel');
owl.jumpTo(3);
});
There are few ways how you can achieve this.
- You can use Options that are served by the owl-carousel
startPosition Type: Number/String Default: 0
Start position or URL Hash string like '#id'.
$(".owl-one").owlCarousel({
startPosition: 0 // 1, 2, 3
})
- You can use Events
to.owl.carousel Type: triggerable Parameter: [position, speed] Goes to position.
$('.owl-one').trigger("to.owl.carousel", [2, 200]);