Javascript examples for jQuery Method and Property:appendTo
change table cells position
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(function(){//from w w w . j av a 2 s . co m $('#mytable tr td:eq(0)').appendTo('#mytable tr'); }); </script> </head> <body> <table id="mytable"> <tbody> <tr> <td>1</td> <td>2</td> </tr> </tbody> </table> </body> </html>