作者:go800li | 来源:互联网 | 2023-10-10 18:45
Ihavetoremoveadivwithanemptyultaginit.我必须删除一个带有空ul标签的div。EDIT:Theultagisnotempt
I have to remove a div with an empty ul tag in it.
我必须删除一个带有空ul标签的div。
EDIT: The ul tag is not empty, it has a bunch of whitespace in it.
编辑:ul标签不是空的,它有一堆空格。
I want to do this with jQuery
我想用jQuery做到这一点
This is what I have so far:
这是我到目前为止:
$('trim(#menu):empty').parent().remove();
Where the id of my div is 'menu'.
我的div的id是'menu'。
Example:
before: