Move <tr> with JQuery

uzer

New Member
I have a table on my page like this.\[code\] <table border="1"> <tr> <td>first</td> <td><a href="http://stackoverflow.com/questions/13880290/#">first click</a></td> </tr> <tr> <td>second</td> <td><a href="http://stackoverflow.com/questions/13880290/#">second click</a></td> </tr> <tr> <td>third</td> <td><a href="http://stackoverflow.com/questions/13880290/#">third click</a></td> </tr> <tr id="change"> <td colspan="2"> <button>change</button> </td> </tr> </table>\[/code\]When I click on of the links, I want the move '#change' under the clicked link's . For example; when I click on "first click" table changes like this..\[code\] <table border="1"> <tr> <td>first</td> <td><a href="http://stackoverflow.com/questions/13880290/#">first click</a></td> </tr> <tr id="change"> <td colspan="2"> <button>change</button> </td> </tr> <tr> <td>second</td> <td><a href="http://stackoverflow.com/questions/13880290/#">second click</a></td> </tr> <tr> <td>third</td> <td><a href="http://stackoverflow.com/questions/13880290/#">third click</a></td> </tr> </table>\[/code\]How can I do it with JQuery? Thanks..
 
Back
Top