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

javascript - Complete OpenIDConnect auth when requesting via Ajax -

c# - Replace text in MailItem Body -

java - Get more than One value and display it -