I'd to add a wrapper around a row with jquery. I've made several attempts but am not able to. I'm only able via have a html template and filling in but doing orig.html() I lose any input selections values that were there.
Original html
<table><tbody>
<tr id="myitem1"><td>I need a coat1</td></tr>
<tr id="myitem2"><td>I need a coat2</td></tr></tbody></table>
=== I want to use jquery to wrap the rows and add a button cell and get a result of:
<table><tbody>
<tr id="myitem1">
<td>
<table><tbody>
<tr><td>I need a coat1</td></tr>
</tbody></table>
</td>
<td><input type="button" value="click1"></td>
</tr>
<tr id="myitem2">
<td>
<table><tbody>
<tr><td>I need a coat2</td></tr>
</tbody></table>
</td>
<td><input type="button" value="click1"></td>
<tr>
</tbody></table>