【问题标题】:Swiper Slider Mouse Hover Pagination滑动滑块鼠标悬停分页
【发布时间】:2017-08-14 06:31:47
【问题描述】:

我想在 Swiper Slider 上进行鼠标悬停分页。我该怎么做?

这是我的 javascript 代码;

        var subSlider = new Swiper ('.subsSlider', {
          // Optional parameters
            direction: 'vertical',
            loop: true,
            // If we need pagination
            pagination: '.swiper-pagination',
            paginationClickable: true,
            paginationBulletRender: function (swiper, index, className) {
                return '<span class="' + className + '">' + (index + 1) + '</span>';
            }
        }) 

【问题讨论】:

  • 如果解决了您的问题,请标记答案。

标签: swiper


【解决方案1】:

通过常规/普通 CSS hover 样式 -

.swiper-pagination-bullet:hover{
  background: red;
}

【讨论】:

    【解决方案2】:
    $('.swiper-pagination-bullet').hover(function() {
        $( this ).trigger( "click" );
    });
    

    【讨论】:

      猜你喜欢
      • 2020-02-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多