我已经为下拉菜单编写了HTML,但是它无法正常工作。当我点击“产品”时,会出现下拉菜单,但是当我再次点击“产品”时,下拉菜单不会关闭。
<div class="dropdown-menu" id="dropdown-toggle">
<div class="dropdown-inner" id="dropdown-down"> {% for children in category.children|batch(category.children|length / category.column|round(1, 'ceil')) %}
<ul class="list-unstyled" id="ul-dropdown">
{% for child in children %}
<li>
<a href="{{ child.href }}">{{ child.name }}</a>
</li>
{% endfor %}
</ul>
{% endfor %}</div>
{# <a href="{{ category.href }}" class="see-all">{{ text_all }} {{ category.name }}</a> #}
</div>