1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Swiper.jsの自動再生のバグ対策

Posted at

備忘録です。スライダーを逆方向に自動で流れるように動作させた時、別のタブに移動したり、ウィンドウサイズを変更したりすると、スライドが表示されなくなるバグがあります。解決策を見つけるまでに時間がかかりましたので、忘れないように書きます。

解決策

  autoplay: {
    delay: 0,
    disableOnInteraction: false,
    reverseDirection: true,
    pauseOnMouseEnter: false,
},

reverseDirectionで逆再生する場合はセットでpauseOnMouseEnterを無効にしましょう。

参考記事

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?