javascript - Clone an element without the children in jQuery -


i have table , want clone without children. note simplified markup brevity, table has many properties , event handlers want copy.

<table data-x="..." class="a b c">     <tr>...</tr>     <tr>...</tr>     <tr>...</tr>     .     .     . </table>  

i don't want copy delete children afterwards, i'm not sure think it's not efficient.

i don't think can clone element without it's children using jquery can plain javascript. node.clonenode(). won't copy attached event listeners

clonenode


Comments

Popular posts from this blog

php - Wordpress: Link a post to posts of another category manually -

delphi xe7 upload/download dropbox file using the rest client and show progress -

java - Get more than One value and display it -