"JQuery .removeClass()"의 두 판 사이의 차이

(새 문서: ==개요== ;jQuery .removeClass() *클래스 제거 함수 *HTML 요소에서 CSS class를 제거하는 jQuery 메소드 ==예시== <source lang='html5'> <style> .highlight { backgro...)
 
잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
 
(사용자 2명의 중간 판 5개는 보이지 않습니다)
1번째 줄: 1번째 줄:
==개요==
==개요==
;jQuery .removeClass()
;jQuery .removeClass()
*클래스 제거 함수
*CSS 클래스 제거 함수
*HTML 요소에서 CSS class를 제거하는 jQuery 메소드
*HTML 요소에서 CSS class를 제거하는 jQuery 메소드


==예시==
==예시==
<source lang='html5'>
<syntaxhighlight lang='html5'>
<style>
<style>
.highlight { background: yellow; }
.highlight { background: yellow; }
20번째 줄: 20번째 줄:
<p class='highlight'>and</p>
<p class='highlight'>and</p>
<p class='highlight'>Goodbye</p>
<p class='highlight'>Goodbye</p>
</source>
</syntaxhighlight>
<jsfiddle>7awfp9qs</jsfiddle>
<jsfiddle height='180'>7awfp9qs</jsfiddle>


==같이 보기==
==같이 보기==
*[[jQuery .addClass()]]
*[[jQuery .addClass()]]
*[[jQuery .toggleClass()]]
*[[jQuery .hasClass()]]
*[[jQuery .hasClass()]]
*[[jQuery .css()]]
*[[jQuery .css()]]


==참고 자료==
==참고==
*https://api.jquery.com/removeclass/
*https://api.jquery.com/removeclass/


[[분류: jQuery]]
[[분류: JQuery Manipulation]]

2020년 11월 2일 (월) 02:53 기준 최신판

1 개요[ | ]

jQuery .removeClass()
  • CSS 클래스 제거 함수
  • HTML 요소에서 CSS class를 제거하는 jQuery 메소드

2 예시[ | ]

html
Copy
<style>
.highlight { background: yellow; }
</style>
 
<script src="//code.jquery.com/jquery.min.js"></script>
<script>
$(function() {
	$("p").last().removeClass( "highlight" );
});
</script>
 
<p class='highlight'>Hello</p>
<p class='highlight'>and</p>
<p class='highlight'>Goodbye</p>

3 같이 보기[ | ]

4 참고[ | ]