(→예시) |
(→같이 보기) |
||
25번째 줄: | 25번째 줄: | ||
==같이 보기== | ==같이 보기== | ||
*[[jQuery .addClass()]] | *[[jQuery .addClass()]] | ||
*[[jQuery .toggleClass()]] | |||
*[[jQuery .hasClass()]] | *[[jQuery .hasClass()]] | ||
*[[jQuery .css()]] | *[[jQuery .css()]] |
2015년 9월 20일 (일) 15:02 판
1 개요
- jQuery .removeClass()
- 클래스 제거 함수
- 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
로그인하시면 댓글을 쓸 수 있습니다.