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

home2 게시판 JavaScript, TS 게시판 탭기능 만들때 $ un defined 오류가 뜹니다.

탭기능 만들때 $ un defined 오류가 뜹니다.

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

    김태현
    참가자
    같은 폴더안에  tab.js 를 만들었고
    입력했고
    <script src="tab.js"></script>
          
        
    tab.js 안에 
    
    
    $('.tab-button').eq(0).on('click',function(){
        $('.tab-button').removeClass('orange')
        $('.tab-button').eq(0).addClass('orange')
        $('.tab-content').removeClass('show')
        $('.tab-content').eq(0).addClass('show')
    });
    
    잘넣었는데 오류가 뜹니다 ... 
    J쿼리 문제인가 싶어서 디테일 html 파일안에 제이 쿼리를 삭제했따 넣어봤다 했는데 해결이안됩니다 ㅜㅜ
    
    
    ERROR: '$' is not defined. [no-undef]
    $('.tab-button').eq(0).on('click',function(){
    4
     
    ERROR: '$' is not defined. [no-undef]
    $('.tab-button').removeClass('orange')
    5
     
    ERROR: '$' is not defined. [no-undef]
    $('.tab-button').eq(0).addClass('orange')
    6
     
    ERROR: '$' is not defined. [no-undef]
    $('.tab-content').removeClass('show')
    7
     
    ERROR: '$' is not defined. [no-undef]
    $('.tab-content').eq(0).addClass('show')
    JSLint (10)
    3
     
    '$' was used before it was defined.
    $('.tab-button').eq(0).on('click',function(){
    3
     
    Missing space between ',' and 'function'.
    $('.tab-button').eq(0).on('click',function(){
    3
     
    Expected exactly one space between 'function' and '('.
    $('.tab-button').eq(0).on('click',function(){
    3
     
    Expected exactly one space between ')' and '{'.
    $('.tab-button').eq(0).on('click',function(){
    3
     
    Missing space between ')' and '{'.
    $('.tab-button').eq(0).on('click',function(){
    4
     
    Missing 'use strict' statement.
    $('.tab-button').removeClass('orange')
    4
     
    Expected ';' and instead saw '$'.
    $('.tab-button').removeClass('orange')
    5
     
    Expected ';' and instead saw '$'.
    $('.tab-button').eq(0).addClass('orange')
    6
     
    Expected ';' and instead saw '$'.
    $('.tab-content').removeClass('show')
    7
     
    Expected ';' and instead saw '}'.
    $('.tab-content').eq(0).addClass('show')
    
    #54323

    codingapple
    키 마스터
    jquery 설치파일하단에 작성해야 잘됩니다 
    에디터에서만 보이는 오류같은거면 무시해도 됩니다
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 호 / 개인정보관리자 : 박종흠