I am trying to put checkboxes in a bootstrap dropdown. I do not want the dropdown to close on click but I still want it close if they click else where on the website. I still want to fire off other javascript actions on click with in the dropdown. I have an example of the exact inverse of what I want. This example closes the drop down on click but keeps it open when clicked from the outside the dropdown area.
$(function () {
$('.dropdown.keep-open').on({
"shown.bs.dropdown": function() {
$(this).data('closable', false);
},
"click": function() {
$(this).data('closable', true);
},
"hide.bs.dropdown": function() {
return $(this).data('closable');
}
});
});