jQuery die() 메서드

❮ jQuery 이벤트 메소드

예시

모든 <p> 요소에 대해 live() 메서드로 추가된 모든 이벤트 핸들러를 제거합니다.

$("p").die();

정의 및 사용

die() 메서드는 jQuery 버전 1.7에서 더 이상 사용되지 않으며 버전 1.9에서 제거되었습니다. 대신 off() 메서드를 사용하십시오.

die() 메서드는 선택한 요소에 대해 live() 메서드 로 추가된 하나 이상의 이벤트 핸들러를 제거합니다 .


통사론

$(selector).die(event,function)

Parameter Description
event Required. Specifies one or more event handlers to remove.

Multiple event values are separated by space. Must be a valid event
function Optional. Specifies a specific function to remove

직접 해보십시오 - 예


die() 메서드를 사용하여 선택한 요소에서 하나의 특정 이벤트 핸들러만 제거하는 방법.


❮ jQuery 이벤트 메소드