$("p").unwrap();
$('td').each(function(){ var data = $(this).children("p").html(); $(this).children("p").detach(); $(this).html(data); });