채택완료

제이쿼리 질문좀 드리겠습니다.

2018-02-26 (월) 17:37:37 2,375

안녕하세요 질문좀 드리겠습니다

탭메뉴 안에 스와이프 슬라이드를 넣은건데 

스와이프 슬라이드가 작동을 안합니다 ㅠㅠ

혹시 뭐떄문인지 알려주시면 감사하겠습니다 

Copy
<script>
 $(function () {

    $(".tab_content").hide();
    $(".tab_content:first").show();

    $("ul.tabs li").click(function () {
        $("ul.tabs li").removeClass("active").css("color", "#797979");
        //$(this).addClass("active").css({"color": "darkred","font-weight": "bolder"});
        $(this).addClass("active").css("color", "#fff");
        $(".tab_content").hide()
        var activeTab = $(this).attr("rel");
        $("#" + activeTab).fadeIn()
    });
});

 var swiper = new Swiper('.swiper-container', {
      spaceBetween: 30,
      centeredSlides: true,
      autoplay: {
        delay: 2500,
        disableOnInteraction: false,
      },
      pagination: {
        el: '.swiper-pagination',
        clickable: true,
      },
      navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev',
      },
    });
</script>
|

답변 2개 / 댓글 1개

채택된 답변
+20 포인트
2018-02-26 (월) 20:19:59

9번째줄, 11번째줄 끝에 세미콜론(;)빠졌어요오오오~~~~

$("#" + activeTab).fadeIn() => $( '.tab_content' ).eq( $(this).index() ).fadeIn()

답변에 대한 댓글 1개

2018-02-26 (월) 18:15:21
제가 초보라서 그런데 어떻게 하시라는거죠 ㅠㅠ?

답변을 작성하려면 로그인이 필요합니다.