본문 바로가기
jquery

[jquery]clone 요소 복사

by ponionq 2021. 1. 10.

clone()

-선택한 요소의 복사

 

참고 : 성능상의 이유로 특정 양식 요소의 동적 상태 (예 :에 입력 된 사용자 데이터 textarea및에 대한 사용자 선택 select)는 복제 된 요소에 복사되지 않습니다. 

input요소를 복제 할 때 요소의 동적 상태 (예 : 텍스트 입력에 입력 된 사용자 데이터 및 확인란에 대한 사용자 선택)가 복제 된 요소에 유지됩니다.

 

See the Pen clone by onion (@saetmlda) on CodePen.

 

 

 

 

참고사이트 : api.jquery.com/clone/#clone-withDataAndEvents

 

.clone() | jQuery API Documentation

Description: Create a deep copy of the set of matched elements. The .clone() method performs a deep copy of the set of matched elements, meaning that it copies the matched elements as well as all of their descendant elements and text nodes. Note: For perfo

api.jquery.com

'jquery' 카테고리의 다른 글

[jquery] after 와 insertAfter / before 와 insertBefore  (0) 2021.01.10
[jquery] append/appendTo 와 prepend/prependTo  (0) 2021.01.10
[jquery] wrap() 와 wrapAll()  (0) 2021.01.10
[jquery] 요소 찾기  (0) 2021.01.10
[jquery] 메서드 체인닝  (0) 2021.01.09

댓글