how to hide attributes if detect this <p> </p>
My problem is when my client insert data(example table) with ckeditor , when i see the source code , ckeditor will add this <p> </p>
after table code. i know how to remove this manualy with source code(open source code and delete) but not my client!
Orignal answer : How do I remove empty p tags with jQuery?
Try
$('p').each(function() {
var $this = $(this);
if($this.html().replace(/\s| /g, '').length == 0)
$this.remove(); });
here is working code : http://jsfiddle.net/ambiguous/7L4WZ/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With