I am trying to check the boxes in the bootstrap dropdown. I donβt want the drop-down list to be closed by click, but I still want to close it if they click elsewhere on the website. I still want to disable other javascript actions when I click on the dropdown menu. I have an example of an exact reference to what I want. This example closes the click on a click, but it opens when called from a drop-down list.
$(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'); } }); });
http://jsfiddle.net/KyleMit/ZS4L7/
drop-down-menu twitter-bootstrap
user1978109
source share