我正在生成一个嵌套列表。 jquery无法正常工作“动态嵌套列表展开折叠点击div”
你能不能请任何人帮助我。当我点击000然后功能展开崩溃应该运行
$('li.dropdown').click(function() {
$('li.dropdown').not(this).find('ul').hide();
$(this).find('ul').toggle();
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<ul>
<li class="dropdown">Data mining and data warehousing
<div class="buttonShow">000</div>
<ul>
<li>Data mining techniques
<div class="buttonShow">000</div>
</li>
<li>Knowledge discovery
<div class="buttonShow">
000</div>
</li>
</ul>
</li>
<li class="dropdown">Soft computing and artificial intelligence
<div class="buttonShow">000</div>
<ul>
<li>Fuzzy systems
<div class="buttonShow">000</div>
</li>
<li>Neural networks
<div class="buttonShow">000</div>
</li>
</ul>
</li>
</ul>