jquery detach1 [jquery] detach 와 remove detach -선택한 요소를 DOM 요소에서 삭제(데이터와 이벤트는 유지) remove -선택한 요소를 요소에서 제거(데이터와 이벤트는 삭제) 아래 예제을 보면 detach을 사용한 버튼 이벤트의 p 태그 클릭 이벤트는 버튼을 클릭해도 이벤트가 유지하고 있지만 remove을 사용한 버튼 이벤트의 p 태그는 버튼을 클릭하면 p 태그의 클릭 이벤트도 같이 사라진다. See the Pen detach() and remove() by onion (@saetmlda) on CodePen. 참고 사이트 : api.jquery.com/remove/ .remove() | jQuery API Documentation Description: Remove the set of matched elements from the D.. 2021. 1. 10. 이전 1 다음