퍼블리싱 플러그인

[Swiper] 한 페이지내에서 같은 형식의 슬라이드가 여러개 쓰일때

  • 지수
  • 2023-02-27 15:00

 


1

2

3

4

5

6

7

8

9

10

11

12

13

14

15



$('.swiper').each(function(i){

        const $this = $(this);

        

        $this.addClass('클래스 새로 부여' + i);

 

        const comonSwiper = new Swiper('클래스 새로 부여' + i, {

            slidesPerView:2,

            spaceBetween:15,

            pagination: {

                el: $('클래스 새로 부여' + i).find('.swiper-pagination'),

                type: 'progressbar',

            },

        });

});

 



cs
Share
지수
지수

열정 열정 열정!

전체 0