STRIP EMPTY TAGS
by bizamajig
HTML
<p></p>
<p> </p>
<p> </p>
<p>
</p>
<p>Where is pancakes house?</p>
CSS
p {
margin: 1em;
border: 1px solid red;
}
JavaScript
$('p').each(function() {
var $this = $(this);
if($this.html().replace(/\s| /g, '').length == 0)
$this.remove();
});