Is there a way to remove this
<p> </p>
using jQuery?
Try:
$('p') .filter(function() { return $.trim($(this).text()) === '' && $(this).children().length == 0 }) .remove()
What that does is it finds all the <p>s that have nothing in them, and removes them from the DOM.
<p>
1.4m articles
1.4m replys
5 comments
57.0k users