(→예시) |
Jmnote bot (토론 | 기여) 잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight )) |
||
(사용자 2명의 중간 판 4개는 보이지 않습니다) | |||
1번째 줄: | 1번째 줄: | ||
==개요== | ==개요== | ||
;jQuery .removeClass() | ;jQuery .removeClass() | ||
*클래스 제거 함수 | *CSS 클래스 제거 함수 | ||
*HTML 요소에서 CSS class를 제거하는 jQuery 메소드 | *HTML 요소에서 CSS class를 제거하는 jQuery 메소드 | ||
==예시== | ==예시== | ||
< | <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> | ||
</ | </syntaxhighlight> | ||
<jsfiddle height='180'>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 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 참고[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.