如何在移动视图中运行 jumpTo(n) 滑块猫头鹰-carusel.

How to run jumpTo(n) slider in mobile view owl-carusel?

本文关键字:-carusel 猫头鹰 jumpTo 移动 视图 运行      更新时间:2023-09-26

我正在使用猫头鹰轮播作为滑块,我想要的是跳转到移动视图中的第三张图片,该怎么办?

猫头鹰滑块

这是我的js代码:

$(document).ready(function(){
  $("#owl-demo").owlCarousel({
    autoPlay: true, // Set AutoPlay to 3 seconds
    items: 5,
    itemsDesktop: [1199, 3],
    itemsDesktopSmall: [979, 3],
    itemsMobile: [479, 1]    
  });
})

提前谢谢你! :)

$(document).ready(function(){
  $("#owl-demo").owlCarousel({
    autoPlay: true, // Set AutoPlay to 3 seconds
    items: 5,
    itemsDesktop: [1199, 3],
    itemsDesktopSmall: [979, 3],
    itemsMobile: [479, 1]    
  });
  var owl = $("#owl-demo");
  owl.jumpTo(x) //x= some number
})

不错的代码笔示例在这里