I am using this ajax success to clone a tr
with its td
inside it:
success: function(response){
var file = $(".drop-file").clone();
file.html(response);
$('.myfiles').append(file);
}
This is my html structure:
<tr class="drop-file">
<td class="myFiles"></td>
</tr>
At this moment, this is the output:
<tr class="drop-file">
<td class="myFiles">
<tr class="filename">1.png</tr>
<tr class="filename">2.png</tr>
<tr class="filename">3.png</tr>
</td>
</tr>
But it should be like this:
<tr class="drop-file">
<td class="myFiles">1.png</td>
<td class="myFiles">2.png</td>
<td class="myFiles">3.png</td>
</tr>
How can i achieve that?