|
|
@@ -945,47 +945,6 @@ var fnGetEigenApi = function (id){
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- /* SLIDE - MAIN_RECOMM */
|
|
|
- //MAIN_RECOMM_키워드 탭
|
|
|
- $(".main_recomm .tag_list .btn").click(function () {
|
|
|
- var recommActive = $(this).attr('data-tab');
|
|
|
- $(".main_recomm .tag_list .btn").removeClass('active');
|
|
|
- $(".main_recomm .tagitem").removeClass('active');
|
|
|
- $(this).addClass('active');
|
|
|
- $('#' + recommActive).addClass('active');
|
|
|
- });
|
|
|
-
|
|
|
- function init() {
|
|
|
-
|
|
|
- if (main_recomm_slide != null) main_recomm_slide.destroy();
|
|
|
-
|
|
|
- var main_recomm_slide = new Swiper('.main_recomm .post-recomm', {
|
|
|
- slidesPerView: 5,
|
|
|
- slidesPerGroup: 5,
|
|
|
- speed: 1000,
|
|
|
- spaceBetween: 20,
|
|
|
- loop: true,
|
|
|
- a11y: {
|
|
|
- enabled: true,
|
|
|
- notificationClass: 'swiper-notification',
|
|
|
- prevSlideMessage: '이전 슬라이드',
|
|
|
- nextSlideMessage: '다음 슬라이드',
|
|
|
- paginationBulletMessage: '슬라이드 {{index}}로 이동',
|
|
|
- },
|
|
|
- pagination: {
|
|
|
- el: '.main_recomm .swiper-pagination',
|
|
|
- clickable: true,
|
|
|
- },
|
|
|
- navigation: {
|
|
|
- nextEl: '.main_recomm .swiper-button-next',
|
|
|
- prevEl: '.main_recomm .swiper-button-prev',
|
|
|
- },
|
|
|
- observer: true,
|
|
|
- observeParents: true,
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- init();
|
|
|
|
|
|
/* SLIDE - MAIN_FORYOU */
|
|
|
var cntNum = 0;
|
|
|
@@ -1496,32 +1455,39 @@ $(".main_recomm .tag_list .btn").click(function(){
|
|
|
});
|
|
|
function init(){
|
|
|
|
|
|
- if(main_recomm_slide != null) main_recomm_slide.destroy();
|
|
|
-
|
|
|
- var main_recomm_slide = new Swiper ('.main_recomm .post-recomm', {
|
|
|
- slidesPerView: 5,
|
|
|
- slidesPerGroup: 5,
|
|
|
- speed : 1000,
|
|
|
- spaceBetween: 20,
|
|
|
- loop : true,
|
|
|
- a11y: {
|
|
|
- enabled: true,
|
|
|
- notificationClass: 'swiper-notification',
|
|
|
- prevSlideMessage: '이전 슬라이드',
|
|
|
- nextSlideMessage: '다음 슬라이드',
|
|
|
- paginationBulletMessage: '슬라이드 {{index}}로 이동',
|
|
|
- },
|
|
|
- pagination: {
|
|
|
- el: '.main_recomm .swiper-pagination',
|
|
|
- clickable: true,
|
|
|
- },
|
|
|
- navigation: {
|
|
|
- nextEl: '.main_recomm .swiper-button-next',
|
|
|
- prevEl: '.main_recomm .swiper-button-prev',
|
|
|
- },
|
|
|
- observer:true,
|
|
|
- observeParents: true,
|
|
|
- });
|
|
|
+ // md pick 섹션별 스와이프 개별설정으로 변경. 5개 이하는 loop 옵션에 false 적용 21.10.21
|
|
|
+ for(var i=1; i<= $(".main_recomm .post-recomm").length; i++ ){
|
|
|
+ var obj = $(".main_recomm #tag" +i + " .post-recomm");
|
|
|
+ var len = $(".main_recomm #tag" +i + " .post-recomm .item_prod").length;
|
|
|
+ var bool = true;
|
|
|
+ if( len < 6 ) bool = false;
|
|
|
+
|
|
|
+ var main_recomm_slide = new Swiper (obj, {
|
|
|
+ slidesPerView: 5,
|
|
|
+ slidesPerGroup: 5,
|
|
|
+ speed : 1000,
|
|
|
+ spaceBetween: 20,
|
|
|
+ loop : bool,
|
|
|
+ loopedSlides: 5,
|
|
|
+ a11y: {
|
|
|
+ enabled: true,
|
|
|
+ notificationClass: 'swiper-notification',
|
|
|
+ prevSlideMessage: '이전 슬라이드',
|
|
|
+ nextSlideMessage: '다음 슬라이드',
|
|
|
+ paginationBulletMessage: '슬라이드 {{index}}로 이동',
|
|
|
+ },
|
|
|
+ pagination: {
|
|
|
+ el: '.main_recomm .swiper-pagination',
|
|
|
+ clickable: true,
|
|
|
+ },
|
|
|
+ navigation: {
|
|
|
+ nextEl: '.main_recomm .swiper-button-next',
|
|
|
+ prevEl: '.main_recomm .swiper-button-prev',
|
|
|
+ },
|
|
|
+ observer:true,
|
|
|
+ observeParents: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
init();
|