Remove elements with only a   space using jQuery

后端 未结 8 639
北恋
北恋 2020-11-30 07:34

Is there a way to remove this

using jQuery?

8条回答
  •  有刺的猬
    2020-11-30 08:24

    Probably same answer as here, try to do this on code behind.

    With jquery i'll use this:

    $("p:empty").remove();
    

    Also you could use .empty(), that will remove all child nodes from the set of matched elements.

提交回复
热议问题