[jQuery] Table Manipulation Help!

2008-06-13 Thread Amit

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
td1/td
tda href=1.html2/a/td
td3/td
  /tr
  tr class=msgold
td4/td
tda href=2.html5/a/td
td6/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
tda href=1.html1/a/td
tda href=1.html2/a/td
td3/td
  /tr
  tr class=msgold
tda href=2.html4/a/td
tda href=2.html5/a/td
td6/td
  /tr
/table

I've taken 2 rows, but I want the code to be row number independent.


[jQuery] Table Manipulation Help!

2008-06-13 Thread Amit

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
td1/td
tda href=1.html2/a/td
td3/td
  /tr
  tr class=msgold
td4/td
tda href=2.html5/a/td
td6/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
tda href=1.html1/a/td
tda href=1.html2/a/td
td3/td
  /tr
  tr class=msgold
tda href=2.html4/a/td
tda href=2.html5/a/td
td6/td
  /tr
/table

I've taken 2 rows, but I want the code to be row number independent.