我有以下代码来初始化物化下拉列表:
$(document).ready(function () {
$('.dropdown-button').dropdown({
constrain_width: true,
hover: false,
belowOrigin: true,
alignment: 'right'
});
});
并遵循HTML:
<a class="dropdown-button" href = "#" data-activates = "management-menu-dropdown">
Management<i class = "mdi-navigation-arrow-drop-down right"></i></a>
<ul id="management-menu-dropdown" class="dropdown-content>
<li><a href="/label_list">Manage labels</a></li>
</ul>
但每当我点击dropdown-button
时,似乎都没有应用选项(我特别谈到belowOrigin: true
)。但是当我设置hover: true
时,所有选项似乎都能正常工作,如果我将鼠标悬停在按钮上然后单击它,则下拉列表会再次出现预期效果。这有什么不对? TNX
答案 0 :(得分:0)