So i wanna have a table with 3 rows and next to every row is a button that makes the row go one row up but idk how to doit
table:
<table id="Tabelle1">
<thead>
<th></th>
<th>ID</th>
<th>NAME</th>
<th>Nachname</th>
</thead>
<tbody>
<tr>
<td><input type="button" value="oben"></td>
<td>1</td>
<td>Davin</td>
<td>Humburg</td>
</tr>
<tr>
<td><input type="button" value="oben"></td>
<td>David</td>
<td>Hamburg</td>
</tr>
<tr>
<td><input type="button" value="oben"></td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
</tbody>
</table>
Script:
$(document).ready(function() {
$("#Tabelle1 input.oben").live("click", function() {
var tr = $(this).closest("tr").remove().clone();
tr.find("input.^")
})