我有一些DIV其具有被晔CMS自动生成的内容。
源的截图:
输出:
每个父DIV( {letter}Serv
如果DIV类)为空justPad
不会出现至少一次。 因此,基于截图,A和C的含量,但B和d没有。
我怎么能隐藏{letter}Serv
DIV如果里面没有内容?
我有以下类,我可以申请:
.hideDiv {
display: none;
}
示例代码:
<div id="nServ" class="serviceHolder hidOverflow percPadBottom letterCode">
<h2 class="defaultBlue percPadBottom">N</h2>
<span id="ctl00_BodyPlaceHolder_Collection15">
<a href="#ViewEditorsMenu" data-ektron-editorsmenu-id="EktronEditorsMenu3c275505-4a2c-4384-bf36-081bc3e69279" onclick="return false;" class="EktronEditorsMenuMarker"><img src="/WorkArea/images/application/pin_grey.gif" alt="Editor's Menu" title="Editor's Menu" /></a>
<ul id="EktronEditorsMenu3c275505-4a2c-4384-bf36-081bc3e69279" class="EktronEditorsMenu" style="display:none;">
{CONTENTS}
</ul>
<div class="justPad"><a class="defaultLinks" href="link">Nephrology</a></div>
<div class="justPad"><a class="defaultLinks" href="link">Neurology</a></div>
<div class="justPad"><a class="defaultLinks" href="link">Nutrition</a></div>
</span>
</div>
<div id="bServ" class="serviceHolder hidOverflow percPadBottom letterCode">
<h2 class="defaultBlue percPadBottom">B</h2>
<span id="ctl00_BodyPlaceHolder_Collection15">
<a href="#ViewEditorsMenu" data-ektron-editorsmenu-id="EktronEditorsMenu3c275505-4a2c-4384-bf36-081bc3e69279" onclick="return false;" class="EktronEditorsMenuMarker"><img src="/WorkArea/images/application/pin_grey.gif" alt="Editor's Menu" title="Editor's Menu" /></a>
<ul id="EktronEditorsMenu3c275505-4a2c-4384-bf36-081bc3e69279" class="EktronEditorsMenu" style="display:none;">
{CONTENTS}
</ul>
</span>
</div>