jQuery Remove all table elements while keeping contents intact

This one-liner "unwraps" the table elements around the contents inside. This includes td, tr, tbody, thead, tfoot and table elements. You may wish to do this only in the content area of your page, as it may damage the visual structure of a table based layout.
$('#content table tr td').children().unwrap().unwrap().unwrap().unwrap();
Posted by
Snippet Viewed 3000 times.

Share your jQuery code snippets:

  • Get some recognition & link back to your site.

 

Submit | Browse

Most Recent jquery snippets

Most Viewed