如果 div 中不包含表格,如何隐藏它
我有一个像这样的 div
:
<div class="EventsRollup">
<span class="EventsRollupTitle">Health Lecture Events</span>
<!--this is where a table would be dynamically inserted by sharepoint
based on some filter, if filter is true, a tabel will get in there,
else not-->
</div>
使用 jQuery,如果没有插入 table
,如何隐藏整个 div
因为 div< /code> 有背景色,空背景色显示没有
table
内容?
I have a div
like this:
<div class="EventsRollup">
<span class="EventsRollupTitle">Health Lecture Events</span>
<!--this is where a table would be dynamically inserted by sharepoint
based on some filter, if filter is true, a tabel will get in there,
else not-->
</div>
Using jQuery, how do I hide the whole div
if no table
was inserted because the div
has background color and the empty background color shows with no table
contents?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
或者
or
这假设只有一个
.EventsRollup
...如果有更多,您可以使用循环...This assumes there is only one
.EventsRollup
... If there are more, you could use a loop...