1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
<html>
<head>
<script type="text/javascript" src="/scripts/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="/scripts/tablednd.js"></script>
</head>
<body>
<table>
<thead>
<tr class="nodrag nodrop">
<th>Title</th>
<th>Text</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>text 0</td>
</tr>
<tr>
<td>1</td>
<td>text 1</td>
</tr>
</tbody>
</table>
<script type="text/javascript">
$(document).ready(function(){
$("table").tableDnD({
onDrop: function(table, row) {
alert("test");
}
});
});
</script>
</body>
</html> |