Created
September 25, 2018 09:04
-
-
Save mhige/5f6b0b67996d7c3cd611c45323e99e62 to your computer and use it in GitHub Desktop.
Swiperを動かす
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//swiper.js | |
//jQuery使ってます.. | |
$(document).ready(function () { | |
// swiperをイニシャライズ | |
var mySwiper = new Swiper ('.swiper-container', { | |
// オプションのパラメーターを指定 | |
direction: 'horizontal', | |
effect: "flip", | |
loop: true, | |
spaceBetween: 30, | |
centeredSlides: true, | |
autoplay: { | |
delay: 3000, | |
disableOnInteraction: false, | |
}, | |
pagination: { | |
el: '.swiper-pagination', | |
dynamicBullets: true, | |
clickable: true, | |
}, | |
navigation: { | |
nextEl: '.swiper-button-next', | |
prevEl: '.swiper-button-prev', | |
}, | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment