0
我正在使用基金会下拉,并在其中我有多个事情,我需要进行交互,包括colpick,添加和删除组件等。任何时候我做任何这些操作,下拉关闭,因为它应该是一个下拉菜单。有没有一种很好的方式让下拉菜单忽略我的点击,只有当我点击关闭按钮才能关闭?保持Zurb基金会下拉打开时,点击
我正在使用基金会下拉,并在其中我有多个事情,我需要进行交互,包括colpick,添加和删除组件等。任何时候我做任何这些操作,下拉关闭,因为它应该是一个下拉菜单。有没有一种很好的方式让下拉菜单忽略我的点击,只有当我点击关闭按钮才能关闭?保持Zurb基金会下拉打开时,点击
这foundation forum issue可以帮助你
伸出使用唱段,自动关闭在<ul>
标签=“假”(见自动关闭在documentation。
<a class="button" data-dropdown="autoCloseExample" aria-controls="autoCloseExample" aria-expanded="false">Link Dropdown »</a>
<ul id="autoCloseExample" class="f-dropdown" data-dropdown-content tabindex="-1" aria-hidden="true" aria-autoclose="false" tabindex="-1">
<li><a href="#">This is a link</a></li>
<li><a href="#">This is another</a></li>
<li><a href="#">Yet another</a></li>
</ul>
您正在使用什么类型的下拉列表中?它看起来像内容下拉列表:http://foundation.zurb.com/docs/components/dropdown.html允许你点击它的内部而不关闭。 – cjspurgeon 2014-12-01 18:51:15
嗯,我点击时通过对事件执行stopPropogation来解决了其中两个问题事情我基本上想要一种方法来阻止所有点击事件的发生,所以下拉不会即使当我点击它之外时也是关闭的,然后只有当我点击关闭按钮时才关闭它。 – rwwagner90 2014-12-01 18:58:31