Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

bootstrap prevent dropdown from closing on click

// If an element inside a dropdown menu has the "keep-open" class,
// disable closing the dropdown menu.
$(document).on('click.bs.dropdown.data-api', '.keep-open', function (e) {
  e.stopPropagation();
});
 
PREVIOUS NEXT
Tagged: #bootstrap #prevent #dropdown #closing #click
ADD COMMENT
Topic
Name
9+9 =