在嵌套 Div 中使用 Jquery 隐藏列表 2
尝试使用 Jquery 隐藏嵌套有 6 个 duv 标签的列表 ITEM 2,有些没有 Id:
1-我的列表位于 6 个潜水标签下 2- 这是 UL 列表 3-在选中按钮时尝试显示/隐藏列表项 2
<!--
<div id="master_DefaultContent_rts_up">
<div id="master_DefaultContent_rts_p">
<div id="master_DefaultContent_rts_rt">
<div id="master_DefaultContent_rts_ts3347_up">
<div id="master_DefaultContent_rts_ts3347_t">
<div class="rtsLevel rtsLevel1">
<ul class="rtsUL">
<li class="rtsLI rtsFirst tab_1071">
<a class="rtsLink rtsSelected" href="#">
<span class="rtsOut"><span class="rtsIn">
<span class="rtsTxt">List 1</span>
</span>
</span>
</a>
</li>
<li class="rtsLI tab_1072">
<a class="rtsLink rtsAfter" href="#">
<span class="rtsOut">
<span class="rtsIn">
<span class="rtsTxt">List 2
</span></span></span>
</a>
</li>
<li class="rtsLI rtsLast tab_1073">
<a class="rtsLink" href="#"><span class="rtsOut">
<span class="rtsIn"><span class="rtsTxt">List 3</span>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
-->
Trying to use Jquery to hide List ITEM 2 nested with 6 duv tags some wothout an Ids:
1- My list is under 6 dive tags
2- It is UL list
3- Trying to display / hide list items 2 when button is checked
<!--
<div id="master_DefaultContent_rts_up">
<div id="master_DefaultContent_rts_p">
<div id="master_DefaultContent_rts_rt">
<div id="master_DefaultContent_rts_ts3347_up">
<div id="master_DefaultContent_rts_ts3347_t">
<div class="rtsLevel rtsLevel1">
<ul class="rtsUL">
<li class="rtsLI rtsFirst tab_1071">
<a class="rtsLink rtsSelected" href="#">
<span class="rtsOut"><span class="rtsIn">
<span class="rtsTxt">List 1</span>
</span>
</span>
</a>
</li>
<li class="rtsLI tab_1072">
<a class="rtsLink rtsAfter" href="#">
<span class="rtsOut">
<span class="rtsIn">
<span class="rtsTxt">List 2
</span></span></span>
</a>
</li>
<li class="rtsLI rtsLast tab_1073">
<a class="rtsLink" href="#"><span class="rtsOut">
<span class="rtsIn"><span class="rtsTxt">List 3</span>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
-->
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该能够通过类名找到该元素。所以你可以这样做:(假设你想使用复选框来隐藏/显示):
You should be able to find the element by the class name. So you could do something like this: (Assuming you are wanting to use a checkbox to hide/show):