This is getting annoying — when I click on an item in a Bootstrap dropdown, the dropdown doesn\'t close. I have it set up to open a Facebox lightbox when you click the dropd
Selecting by attribute is the slow way. Here is the most fast solution to hide the opened dropdown:
$(".dropdown-menu.show").parent().dropdown("toggle");
or use following, if the .dropdown-menu is not the next children element (find the closest parent dropdown control):
$(".dropdown-menu.show").closest(".dropdown").dropdown("toggle");