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

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -