I have a html table
<table class="items">
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
</tr>
</table>
I want to get its inner html through class in JQuery
$(".items").html();
this is getting table content but not the whole styling. any solution?
The styling is not stored in your HTML, it’s in your CSS file.
If, for example, you are applying your CSS styles based on the table’s class name (in this case:
items), you’ll have to give the other table (where you’re dropping thetr‘s into) the same class name.