UIkitのモーダル内でSwiperを実行する。

要件

  • .btn1 .btn2 .btn3 …クリック → モーダルが開く
  • モーダル → UIkit の uk-modal
  • Swiper → next/prev ボタン + サムネイル連動
  • クリックしたボタンに対応したスライドを初期表示
  • モーダルを閉じた時、Swiper をリセット

コード

HTML

CSS

JS

coepen

See the Pen モーダルinスライダー by nerdspec (@nerdspec) on CodePen.