How do I remove empty p tags with jQuery?

后端 未结 6 883
后悔当初
后悔当初 2020-12-04 22:32

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...

$

6条回答
  •  借酒劲吻你
    2020-12-04 23:07

    you can try this...

    $([selector]).is(":empty")   
    

    it will return true if selector is empty..Working Demo

提交回复
热议问题