P

jQuery w3schools 한글판 강좌58- jQuery removeClass() Method

· 8년 전 · 1933

jQuery w3schools 한글판 강좌58- jQuery removeClass() 메소드 

 

다음 예는 서로다른 요소들로부터 특정한 클래스 특성(attribute)을 제거하는 방법을 보여줍니다:

Example

$("button").click(function(){
    $("h1, h2, p").removeClass("blue");
});

jQuery toggleClass() 메소드

다음 예는 toggleClass()메소드를 사용하는 방법을 보여줍니다.
이 메소드는 선택된 요소들로부터 클래스들을 추가/삭제 토글링을 해줍니다:

Example

$("button").click(function(){
    $("h1, h2, p").toggleClass("blue");
});

Query css() Method

jQuery css()메소드는 다음 장에서 설명됩니다.

|

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기
🐛 버그신고