WEB UIUX/jQuery
[jQuery]제이쿼리 요소복제/삭제/변경(clone(), remove(), empty(), replaceWith(), replaceWith())
#요소복제와 삭제, 변경 clone() $("요소선택").clone(); - 선택한 요소를 복제(변수에 저장하기) empty() $("요소선택").empty(); - 선택한 요소의 하위요소 삭제 remove() $("요소선택").remove(); - 선택한 요소 삭제 replaceWith() $("요소선택").replaceWith("선택한 요소를 바꿀 새 요소"); - 선택한 요소를 새 요소로 바꿈 replaceAll() $("선택한 모든요소를 바꿀 새 요소").replaceAll("전체를 바꿀 요소선택") - 선택한 모든 요소를 바꿈