Просмотр исходного кода

브랜드 메인 엠디추천영역 수정

bin2107 4 лет назад
Родитель
Сommit
c3318162f6
1 измененных файлов с 36 добавлено и 16 удалено
  1. 36 16
      src/main/webapp/WEB-INF/views/web/display/BrandMainFormWeb.html

+ 36 - 16
src/main/webapp/WEB-INF/views/web/display/BrandMainFormWeb.html

@@ -702,22 +702,42 @@ $(document).ready( function() {
 
 
 	/* SLIDE - MD’S PICK */
-	var br_md_slide = new Swiper('.brand_main .md_item .swiper-container', {
-		navigation: {
-			nextEl: '.md_item .swiper-button-next',
-			prevEl: '.md_item .swiper-button-prev',
-		},
-		loop:true,
-		slidesPerView: 5,
-		slidesPerGroup:5, //210429_추가 : slidesPerGroup 추가.
-		spaceBetween: 22,
-		speed : 1000,
-		pagination: {
-			el: '.md_item .swiper-pagination',
-			clickable: true,
-		},
-	});
-
+	var mdPickCont = $('.post-pick-nav .swiper-slide');
+	var mdPickLength = mdPickCont.length;
+	if(mdPickLength < 6){
+		var br_md_slide = new Swiper('.brand_main .md_item .swiper-container', {
+			initialSlide: 0,
+			navigation: {
+				nextEl: '.md_item .swiper-button-next',
+				prevEl: '.md_item .swiper-button-prev',
+			},
+			loop: false,
+			slidesPerView: 5,
+			//slidesPerGroup:5, //210429_추가 : slidesPerGroup 추가.
+			spaceBetween: 22,
+			speed : 1000,
+			pagination: {
+				el: '.md_item .swiper-pagination',
+				clickable: true,
+			},
+		});
+	}else{
+		var br_md_slide = new Swiper('.brand_main .md_item .swiper-container', {
+			navigation: {
+				nextEl: '.md_item .swiper-button-next',
+				prevEl: '.md_item .swiper-button-prev',
+			},
+			loop:true,
+			slidesPerView: 5,
+			slidesPerGroup:5, //210429_추가 : slidesPerGroup 추가.
+			spaceBetween: 22,
+			speed : 1000,
+			pagination: {
+				el: '.md_item .swiper-pagination',
+				clickable: true,
+			},
+		});
+	}
 
 	/* SLIDE - SPECIAL SHOP */
 	$('.brand_main .special_shop .spe_pr_list .spe_sl').hide();