Bootstrap dropdown closing when clicked

You can omit the dropdown call all together, the bootstrap dropdown works without it. Make sure you’re wrapping your script properly, you can include it on the header or body of your page, although personally i prefer placing it on the body of your page.

JS

<script type="text/javascript">
    $('.dropdown-menu input, .dropdown-menu label').click(function(e) {
        e.stopPropagation();
    });
</script>

Leave a Comment