Reputation: 627
The WordPress word editor spits out empty <p>
tags like this: <p> </p>
.
I would like to target all <p>
with
in them and remove them. I believe I have to use the contains
and remove
functions but I am not sure if this code would remove the <p>
tags with only
in them or remove all <p>
tags with
in them anywhere.
jQuery('p:contains(" ")').remove();
How would I make this work?
Upvotes: 7
Views: 4502