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 2896 times.

Share your jQuery code snippets:

  • Get some recognition & a link back to your site.
  • Create your own code library.
  • Help your fellow developers, as they have helped you.
Submit | Browse

Most Recent jquery snippets

Most Viewed

The FitDesk Under Desk Elliptical