The platform I\'m building a website on produces empty p
tags in wysiwyg mode. How can I take these out?
Something like this, perhaps...
$
Thanks "mu is too short",
I've tried your code It works but I need to wrap it in jQuery(document).ready(function() {});
The full code worked for me is:
jQuery(document).ready(function() {
jQuery('p').each(function() {
var $this = jQuery(this);
if($this.html().replace(/\s| /g, '').length == 0) {
$this.remove();
}
});
});
I don't know why this happens, My jQuery/JS is not so good, I'm learning it ;).
Hope this help another person like me.
Thanks.