document.addEventListener("DOMContentLoaded", function (){ const adverSlideSwiper = new Swiper('.adver_slide.swiper', { direction: 'horizontal', loop: true, speed: 600, spaceBetween: 10, autoplay: { delay: 30000, disableOnInteraction: false, }, pagination: { el: '.adver_page', type: 'fraction', } }); const grandSlideSwiper = new Swiper('.grand_slide.swiper', { direction: 'horizontal', loop: true, slidesPerView: 1, speed: 600, grid: { rows: 3, }, autoplay: { delay: 30000, disableOnInteraction: false, }, spaceBetween: 10, pagination: { el: '.grand_page', type: 'custom', renderCustom: function (swiper, current, total) { const totalPages = Math.ceil(total / 3); const currentPage = Math.ceil(swiper.realIndex + 1); return currentPage + ' / ' + totalPages; }, // *X3 pagenum count clickable: true, } }); const vestSlideSwiper = new Swiper('.vest_slide.swiper', { direction: 'horizontal', // 슬라이드 방향을 가로로 설정 loop: true, slidesPerView: 2, // 한 행당 두 개의 슬라이드 표시 speed: 600, grid: { rows: 3, // 슬라이드 그룹당 3개의 행으로 구성 }, autoplay: { delay: 30000, disableOnInteraction: false, }, spaceBetween: 10, // 슬라이드 간의 간격 pagination: { el: '.vest_page', type: 'custom', renderCustom: function (swiper, current, total) { const totalPages = Math.ceil(total / (1 * 3)); // 한 페이지에 표시되는 슬라이드 수를 기준으로 총 페이지 수 계산 const currentPage = Math.ceil(swiper.realIndex / 1) + 1; return currentPage + ' / ' + totalPages; }, clickable: true, } }); const row1_slideSwiper = new Swiper('.row1_slide.swiper', { direction: 'horizontal', // 슬라이드 방향을 가로로 설정 loop: true, speed: 600, slidesPerView: 1, autoplay: { delay: 30000, disableOnInteraction: false, }, spaceBetween: 10, // 슬라이드 간의 간격 pagination: { el: '.row_1_page', type: 'custom', renderCustom: function (swiper, current, total) { const totalPages = Math.ceil(total ); // 한 페이지에 표시되는 슬라이드 수를 기준으로 총 페이지 수 계산 const currentPage = Math.ceil(swiper.realIndex / 1) + 1; return currentPage + ' / ' + totalPages; }, clickable: true, } }); const PharcyHot_slideSwiper = new Swiper('.PharcyHot_slideSwiper.swiper', { direction: 'horizontal', // 슬라이드 방향을 가로로 설정 loop: true, speed: 600, slidesPerView: 1, autoplay: { delay: 30000, disableOnInteraction: false, }, spaceBetween: 10, // 슬라이드 간의 간격 pagination: { el: '.ph_page', type: 'custom', renderCustom: function (swiper, current, total) { const totalPages = Math.ceil(total ); // 한 페이지에 표시되는 슬라이드 수를 기준으로 총 페이지 수 계산 const currentPage = Math.ceil(swiper.realIndex / 1) + 1; return currentPage + ' / ' + totalPages; }, clickable: true, } }); const PharcyGold_slideSwiper = new Swiper('.PharcyGold_slideSwiper.swiper', { direction: 'horizontal', // 슬라이드 방향을 가로로 설정 loop: true, speed: 600, slidesPerView: 1, autoplay: { delay: 30000, disableOnInteraction: false, }, spaceBetween: 10, // 슬라이드 간의 간격 pagination: { el: '.pg_page', type: 'custom', renderCustom: function (swiper, current, total) { const totalPages = Math.ceil(total ); // 한 페이지에 표시되는 슬라이드 수를 기준으로 총 페이지 수 계산 const currentPage = Math.ceil(swiper.realIndex / 1) + 1; return currentPage + ' / ' + totalPages; }, clickable: true, } }); const PharcyPlus_slideSwiper = new Swiper('.PharcyPlus_slideSwiper.swiper', { direction: 'horizontal', // 슬라이드 방향을 가로로 설정 loop: true, speed: 600, slidesPerView: 1, autoplay: { delay: 30000, disableOnInteraction: false, }, spaceBetween: 10, // 슬라이드 간의 간격 pagination: { el: '.pp_page', type: 'custom', renderCustom: function (swiper, current, total) { const totalPages = Math.ceil(total ); // 한 페이지에 표시되는 슬라이드 수를 기준으로 총 페이지 수 계산 const currentPage = Math.ceil(swiper.realIndex / 1) + 1; return currentPage + ' / ' + totalPages; }, clickable: true, } }); const pharmacySlideSwiper = new Swiper('.pharmacy_slide.swiper', { direction: 'horizontal', // 슬라이드 방향을 가로로 설정 loop: true, slidesPerView: 2, // 한 행당 두 개의 슬라이드 표시 speed: 600, grid: { rows: 3, // 슬라이드 그룹당 3개의 행으로 구성 }, autoplay: { delay: 30000, disableOnInteraction: false, }, spaceBetween: 10, // 슬라이드 간의 간격 pagination: { el: '.pharmacy_page', type: 'custom', renderCustom: function (swiper, current, total) { const totalPages = Math.ceil(total / (1 * 3)); // 한 페이지에 표시되는 슬라이드 수를 기준으로 총 페이지 수 계산 const currentPage = Math.ceil(swiper.realIndex / 1) + 1; return currentPage + ' / ' + totalPages; }, clickable: true, } }); const noticeslideSwiper = new Swiper('.notice_slide.swiper', { direction: 'horizontal', loop: true, speed: 600, spaceBetween: 10, effect: 'fade', fadeEffect:{ crossFade: true, }, autoplay:{ delay: 3000, disableOnInteraction: false, }, }); });