当 Bootstrap 下拉菜单关闭或切换时,是否有我可以关联的事件被触发?
最佳答案
来自 twitter bootstrap official page :
$('#myDropdown').on('hide.bs.dropdown', function () {
// do something…
});
hide.bs.dropdown
是 one of 4 events described here .
更新(2016 年 4 月 13 日)
这些事件在 Bootstrap 4
中也同样有效。 Bootstrap v4 Documentation .
关于javascript - 推特 Bootstrap : Call a js function when a dropdown is closed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12479858/