📜  如何更改 owl nav,如何在 owl carusol 中制作自定义的 next-prev 按钮 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:57.310000             🧑  作者: Mango

代码示例1
var owl = $('.owl-carousel');
owl.owlCarousel();
// Go to the next item
$('.customNextBtn').click(function() {
    owl.trigger('next.owl.carousel');
})
// Go to the previous item
$('.customPrevBtn').click(function() {
    // With optional speed parameter
    // Parameters has to be in square bracket '[]'
    owl.trigger('prev.owl.carousel', [300]);
})