I´ve recently posted a script to move columns from a table using drag and drop javascript. Recently i´ve received a message of a user of this communty showing interest in the script to move lines instead of columns. This post will present the script for you guys.
file: moverows.css
-
table {border-collapse:collapse; cursor:pointer}
-
td {width:30px; padding:5px; text-align:center; font:bold 14px verdana; color:#000; border:1px solid #000}
-
input {width:30px}
-
-
/* classe das cores utilizadas na movimentação */
-
.hover {background:lightblue}
-
.selecionado {background:lightgreen}
-
file: moverows.js
file: moverows.html
-
<html>
-
<body>
-
-
<link rel="StyleSheet" href="moverows.css" type="text/css" />
-
-
<script type="text/javascript" src="moverows.js"></script>
-
-
<table id="tabela">
-
<tr>
-
<td>A1</td>
-
<td>A2</td>
-
<td>A3</td>
-
<td>A4</td>
-
<td>A5</td>
-
</tr>
-
<tr>
-
<td>B1</td>
-
<td>B2</td>
-
<td>B3</td>
-
<td>B4</td>
-
<td>B5</td>
-
</tr>
-
<tr>
-
<td>C1</td>
-
<td>C2</td>
-
<td>C3</td>
-
<td>C4</td>
-
<td>C5</td>
-
</tr>
-
<tr>
-
<td>D1</td>
-
<td>D2</td>
-
<td>D3</td>
-
<td>D4</td>
-
<td>D5</td>
-
</tr>
-
<tr>
-
<td>E1</td>
-
<td>E2</td>
-
<td>E3</td>
-
<td>E4</td>
-
<td>E5</td>
-
</tr>
-
-
</table>
-
-
</body>
-
</html>
-
hope that you people find this useful!
the link to the script to movecolumns is:
http://www.thescripts.com/forum/show...37#post2176637
see yall!