Is there an event that I can tie into that is fired when a bootstrap dropdown is closed or toggled?
In the end, the only reliable method that I found was to use jquery's data api to store the state of the dropdown and add click events to the button and the document.
$(document).ready(function() {
$('#dropdown').data('open', false);
$('#dropdown-button').click(function() {
if($('#dropdown').data('open')) {
$('#dropdown').data('open', false);
update_something();
} else
$('#dropdown').data('open', true);
});
$(document).click(function() {
if($('#dropdown').data('open')) {
$('#dropdown').data('open', false);
update_something();
}
});
});