How to break p tags using jQuery?
6 answers
Sort of:
$("p").each(function(){
var content = $(this).html();
$(this).parent().append(content);
$(this).remove();
});
Searches for all p-tags, gets content. Adds it to the parent element and removes the p tag. It does not work in all cases (for example, if P tags should be at the beginning of the parent element.)
0