<h3>Details<span class="dropdown">View</span></h3>
<div id="sbc">
<ul>
<li><h2>Role: Supervisor</h2></li>
<li>Manager Contact:</li>
<li class="small">*location closed - please contact corporate office for further assistance</li>
<li><a href=""></a></li>
<li><h2>Responsibilities</li>
<li>
<ul>
<li>Assist customers with miscellaneous issues from AIV, AppStore, Kindle Tier 2</li>
<li> - Fallback - Kindle Tier 1</li>
</ul>
</li>
</ul>
</div>
尝试编写jQuery onClick slideDown跨度下方的UL。尝试了多种解决方案,但似乎都失败了。
这是我的jQuery代码:
<script>
(function() {
$('span.dropdown').on('click', function() {
$(this).next('ul').slideToggle();
});
})(jQuery);
</script>
绞尽脑汁......我不是一个完整的菜鸟(但显然我是)并且希望得到一些帮助。
点击***向下滑动:ul:after span
切换它。