[jQuery] Moving the COLUMNS of a table around
Hi,
I was trying to move around the columns of a table. I noticed that you can specify styles for columns using the <col> html construct.<br clear="all">
I tried this...
<script language="javascript">
$(document).ready(function()
{
$("#switch").click(function()
{ $("#2").hide(); });
});
</script>
<table border="1">
<col id="1" width="20px" />
<col id="2" width="20px" />
<col id="3" width="20px" />
<col id="4" width="20px" />
<col id="5" width="20px" />
<col id="6" width="20px"/>
<tbody>
<tr>
<th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th>
</tr>
<tr>
<td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td>
</tr>
<tr>
<td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td>
</tr>
</tbody>
</table>
Here only "Hide" worked. Remove, insertBefore, insertAfter did not work for obvious reasons
Any ideas on how to achieve that?? reordering the columns of a table...
Gurpreet
--
Gurpreet Singh