I have a twitter bootstrap dropdown inside a div with the plugin jOrgChart.
The problem I\'m having is that when I click the button to open the dropdown menu it also
Building on Joe's answer, this includes the normal dropdown functionality of closing on the next click.
$("#orgchart").jOrgChart({ chartElement: '#chart' });
$("div#chart div.btn-group > a.dropdown-toggle, .dropdown-menu li a").click((e) => {
e.stopPropagation();
$('.dropdown-menu').toggle();
// close on next click only
$(window).one("click", () => $('.dropdown-menu').toggle());
});