• 로그인
  • 장바구니에 상품이 없습니다.

home2 게시판 JavaScript, TS 게시판 for문첫강의

for문첫강의

2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 글쓴이
  • #93372

    박지현
    참가자
    for(let i = 0 ; i < 3; i++){
        let tab_button = document.querySelectorAll('.tab-button')[i];
        let tab_content = document.querySelectorAll('.tab-button')[i];
        tab_button.addEventListener('click', function(){
            for(let j = 0 ; j < 3 ; j++){
                let tab_content_remove = document.querySelectorAll('.tab_content')[j];
                let tab_button_remove = document.querySelectorAll('.tab_button')[j];
     여기           tab_content_remove.classList.remove('show');
     여기           tab_button_remove.classList.remove('orange');
            }
                tab_button.classList.add('orange');
                tab_content.classList.add('show');
        })
    }
    강의에서 jQuery로 작성된 부분을 jQuery없이 하고 있었습니다.
    여기 체크한 부분이 왜 에러가 나는지 모르겠습니다.
    #93389

    codingapple
    키 마스터
    .tab_content 라는 클래스명이 틀린듯요
2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 답변은 로그인 후 가능합니다.

About

현재 월 700명 신규수강중입니다.

  (09:00~20:00) 빠른 상담은 카톡 플러스친구 코딩애플 (링크)
  admin@codingapple.com
  이용약관
ⓒ Codingapple, 강의 예제, 영상 복제 금지
top

© Codingapple, All rights reserved. 슈퍼로켓 에듀케이션 / 서울특별시 강동구 고덕로 19길 30 / 사업자등록번호 : 212-26-14752 온라인 교육학원업 / 통신판매업신고번호 : 제 2017-서울강동-0002 호 / 개인정보관리자 : 박종흠