samedi 21 mars 2020

Bootstrap: prevent panel from collapsing on checkbox click

So I've a panel heading which contains some text and a checkbox. How do I prevent the panel from collapsing when I toggle the checkbox?

<div class="panel-heading panel-heading-fail">
    <div class="panel-title" data-target="#panel_body"
                             data-toggle="collapse" data-parent="#panel_meta"
                             aria-expanded="true">
        <span class="pull-left">
            <input type="checkbox" class="form-check-input" id="exampleCheck1">
        </span>
        Some Text
    </div>
</div>

Every time I toggle the checkbox it opens/closes the panel. How can I prevent it from doing that?

Thanks.




Aucun commentaire:

Enregistrer un commentaire