Twitter Bootstrap: Call a js function when a dropdown is closed
问题 Is there an event that I can tie into that is fired when a bootstrap dropdown is closed or toggled? 回答1: From twitter bootstrap official page: $('#myDropdown').on('hide.bs.dropdown', function () { // do something… }); hide.bs.dropdown is one of 4 events described here. Update (13-Apr-16) These events also work same in Bootstrap 4 . Bootstrap v4 Documentation. 回答2: This is how Bootstrap v2.3.2 closes the menu no matter what you click on: $('html').on('click.dropdown.data-api', function () {