滚动 swiperjs 时更改幻灯片

问题描述

我在我的一个项目中使用了 swiperjs!我希望在滚动时更改幻灯片! 另外,我希望 wow.js 动画仅在幻灯片处于活动状态时才起作用。 我附上了我的 JS 代码,其中我已经初始化了我的 swiper js!

任何形式的帮助都会非常感激,谢谢!

const swiper = new Swiper(".swiper-container",{
    slidesPerView: 1,direction: getDirection(),mousewheel: true,effect: "fade",speed: 500,autoHeight: false,grabCursor: true,pagination: {
      el: ".swiper-pagination",clickable: true
    },on: {
        resize: function () {
            swiper.changeDirection(getDirection());
      },slideChange: getCurrentSlide,},scrollbar: {
        el: '.swiper-scrollbar',coverflowEffect: {
        rotate: 100,slideShadows: true,});


function getDirection() {
    var windowWidth = window.innerWidth;
    var direction = window.innerWidth >= 767 ? "vertical" : "horizontal";

    return direction;
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)