Cloning a line that has no style and adds tbody to the end

Using jQuery, how can I create a clone of a string that has display: noneas its style and is added to the end of tbody?

My table:

<table>
  <tbody>
   <tr id="tRow0" style="display : none ;">
      <td>  // Some contents (textbox,dropdown etc..)
     </td>
   </tr>
 </tbody>
</table>

I want to create a clone of a hidden row and add to the table. This new line should be displayed on the screen.

+3
source share
1 answer
$('#tRow0').clone().show().appendTo( $('#tRow0').parent() );
+7
source

Source: https://habr.com/ru/post/1722851/


All Articles