$(function(){ /*recruit page01*/ var swiper = new Swiper(".page01Swiper", { loop:true, pagination: { el: ".page01Paging", type: "fraction", }, navigation: { nextEl: ".page01Nxt", prevEl: ".page01Prv", }, autoplay: { delay: 3500, disableOnInteraction: false, pauseOnMouseEnter: true, }, }); var page01_2Swiper = new Swiper(".page01_2Swiper", { loop:true, // pagination: { // el: ".page01Paging", // type: "fraction", // }, slidesPerView:2, slidesPerGroup: 2, spaceBetween:20, navigation: { nextEl: ".page01Nxt", }, autoplay: { delay: 4500, disableOnInteraction: false, pauseOnMouseEnter: true, }, }); /*top5*/ var swiper = new Swiper(".top5_wrap", { loop:true, effect: "fade", fadeEffect: { crossFade: true }, pagination: { el: ".top5Paging", clickable: true, }, autoplay: { delay: 3500, disableOnInteraction: false, pauseOnMouseEnter: true, }, }); /*congratulation page02*/ var congSwiper2 = new Swiper(".congSwiper", { loop: true, // 무한 슬라이드 활성화 slidesPerView: congSwiperCnt(), // 동적으로 슬라이드 개수 설정 slidesPerGroup: 1, // 슬라이드를 1개씩 이동 spaceBetween: 20, // 슬라이드 간격 navigation: { nextEl: ".page02Nxt", // 오른쪽 화살표 버튼 }, autoplay: { delay: 3500, // 자동 슬라이드 대기 시간 disableOnInteraction: false, // 사용자 상호작용 후 자동 슬라이드 유지 pauseOnMouseEnter: true, // 마우스 호버 시 슬라이드 일시 중지 }, loopAdditionalSlides: 3, // 원활한 무한 루프를 위한 추가 슬라이드 설정 }); $('.sideTab_list li').on('click', function(){ if($(this).attr("attr")=="prim"){ var page01_2Swiper = new Swiper(".page01_2Swiper", { loop:true, // pagination: { // el: ".page01Paging", // type: "fraction", // }, slidesPerView:2, slidesPerGroup: 2, spaceBetween:20, navigation: { nextEl: ".page01Nxt", }, autoplay: { delay: 4500, disableOnInteraction: false, pauseOnMouseEnter: true, }, }); } if($(this).attr("attr")=="cong"){ var congSwiper2 = new Swiper(".congSwiper", { loop: true, // 무한 슬라이드 활성화 slidesPerView: congSwiperCnt(), // 동적으로 슬라이드 개수 설정 slidesPerGroup: 1, // 슬라이드를 1개씩 이동 spaceBetween: 20, // 슬라이드 간격 navigation: { nextEl: ".page02Nxt", // 오른쪽 화살표 버튼 }, autoplay: { delay: 3500, // 자동 슬라이드 대기 시간 disableOnInteraction: false, // 사용자 상호작용 후 자동 슬라이드 유지 pauseOnMouseEnter: true, // 마우스 호버 시 슬라이드 일시 중지 }, loopAdditionalSlides: 3, // 원활한 무한 루프를 위한 추가 슬라이드 설정 }); } }); function congSwiperCnt(){ if($(".congSwiperLi").length<3){ return $(".congSwiperLi").length; }else{ return 3; } } // 슬라이드 개수를 반환하는 함수 function congSwiperCnt() { const totalSlides = document.querySelectorAll(".congSwiperLi").length; return totalSlides < 3 ? totalSlides : 3; } var simpleSwiper = new Swiper(".simpleSwiper", { loop:true, slidesPerView:3, slidesPerGroup: 3, spaceBetween:20, navigation: { nextEl: ".page03Nxt", // prevEl: ".page03Prv", }, autoplay: { delay: 3500, disableOnInteraction: false, pauseOnMouseEnter: true, }, }); /*notice*/ var swiper = new Swiper(".noticeDiv", { loop:true, effect: "fade", fadeEffect: { crossFade: true }, navigation: { nextEl: ".notiNxt", prevEl: ".notiPrv", }, on: { "transitionEnd": function () { $(".noticeDiv").find(".swiper-slide-visible").html(); var noiceheadidxName=""; console.log($(".noticeDiv").find(".swiper-slide-visible a").attr("headidx")); if($(".noticeDiv").find(".swiper-slide-visible a").attr("headidx")=="NEWS"){ noiceheadidxName="채용뉴스"; } if($(".noticeDiv").find(".swiper-slide-visible a").attr("headidx")=="NOTICE"){ noiceheadidxName="공지사항"; } $(".noiceheadidxName").html(noiceheadidxName); // console.log($(".noticeDiv").find(".swiper-slide-visible").html()); } }, autoplay: { delay: 3500, disableOnInteraction: false, pauseOnMouseEnter: true, }, }); /*banner*/ var swiper = new Swiper(".slideBanner", { loop:true, // slidesPerView:1, // spaceBetween:45, effect: "fade", fadeEffect: { crossFade: true }, navigation: { nextEl: ".bannNxt", prevEl: ".bannPrv", }, autoplay: { delay: 3500, disableOnInteraction: false, pauseOnMouseEnter: true, }, }); })