首页 > 解决方案 > 如何创建左/右箭头按钮作为轮播上的光标?

问题描述

我正在尝试创建一个轮播并在悬停时用左/右箭头按钮替换标准光标,但找不到任何关于如何实现这一点的参考

$(function(){
var owl = $('.owl-carousel');
owl.owlCarousel({
autoplay: 2000,
items:1,
loop: true,
onInitialized  : counter, //When the plugin has initialized.
onTranslated : counter //When the translation of the stage has finished.
});

标签: jquerycarousel

解决方案


对于 1.3 版

$(document).ready(function() {
  $("#owl-example").owlCarousel({
      items:1,
      loop:true,
      autoplay:true,
      autoplayTimeout:1000,
      autoplayHoverPause:true,
      navigation : true,
      navigationText : ['<span class="fa-stack"><i class="fa fa-circle fa-stack-1x"></i><i class="fa fa-chevron-circle-left fa-stack-1x fa-inverse"></i></span>','<span class="fa-stack"><i class="fa fa-circle fa-stack-1x"></i><i class="fa fa-chevron-circle-right fa-stack-1x fa-inverse"></i></span>'],
  });
});

这是您的演示:https ://codepen.io/anon/pen/OdBBLe


推荐阅读