728x90 반응형 clss검색하기1 [jquery] element에 해당 class가 존재하는지 확인. check box on off toggle event를 위해 해당아이디를 갖고있는 element가 class를 가지고 있는지 확인해야 함. 1. hasClass if( $('#chk_list').hasClass('on') ) { //chk_list가 on이라는 class를 갖고 있는가 } 2. is if( $('#chk_list').is('on') ) { //1번과 동일 } 3. length if( $('#chk_list').length) { //존재하면 true } 2019. 7. 30. 이전 1 다음 728x90 반응형