[jQuery] Table Manipulation Help!

[jQuery] Table Manipulation Help!


Hello all. I'm new to jQuery and Javascript. I've been trying to solve
a problem since last 2 days.. :(
Here is my HTML:
<table border="1" id="test">
<tr class="msgold">
<td>1</td>
<td><a href="1.html">2</a></td>
<td>3</td>
</tr>
<tr class="msgold">
<td>4</td>
<td><a href="2.html">5</a></td>
<td>6</td>
</tr>
</table>
In this table you can see that 2nd column has links. Now what I want
to do is copy the respective links to 1st column. So, it should look
like:
<table border="1" id="test">
<tr class="msgold">
<td><a href="1.html">1</a></td>
<td><a href="1.html">2</a></td>
<td>3</td>
</tr>
<tr class="msgold">
<td><a href="2.html">4</a></td>
<td><a href="2.html">5</a></td>
<td>6</td>
</tr>
</table>
I've taken 2 rows, but I want the code to be row number independent.































    • Topic Participants

    • admin