'use strict'; (function () { var $body = $("body"); // 画面サイズ var winWidth = window.innerWidth; var winHeight = window.innerHeight; var pcFlg = false; if (winWidth > 900) { pcFlg = true; } function updateDOM() { // 画面サイズ winWidth = window.innerWidth; winHeight = window.innerHeight; if (winWidth > 900) { pcFlg = true; } else { pcFlg = false; } } $(window).on('resize', function () { updateDOM(); }); $(window).on("load", function () { updateDOM(); }); // スクロールエフェクト var ScrollEffectModule = new SCROLL_EFFECT_MODULE({ elem: '.js-scroll-item', displayRatio: 0.7, addClassNameActive: 'is-scroll' // displayReverse: true, }); // swiper var swiper = null; var createSwiper = function createSwiper() { var swiperOption = { loop: true, wrapperClass: "p-top__banner-list", slideClass: "p-top__banner-item", slideActiveClass: "p-top__banner-item--active", speed: 600, pagination: { el: '.p-top__banner-pagination', type: 'bullets', clickable: 'true', bulletClass: 'p-top__banner-pagination-bullet', bulletActiveClass: 'p-top__banner-pagination-bullet--active' } }; if (pcFlg) { swiperOption.spaceBetween = 36; swiperOption.loopAdditionalSlides = 2; } if ($(".p-top__banner-item").length >= 2) { swiper = new Swiper('.p-top__banner-wrap', swiperOption); } else { } }; createSwiper(); })();