I am currently working with Bootstrap 4 to design a toggle button; however, when I click the button, the checkbox does not update, despite the fact that the active
class is being applied.
Even when I use
$('.btn-group-toggle').button('toggle')
, the active
state is set but the checked
status of the checkbox remains unchanged.
<div class="btn-group-toggle" data-toggle="buttons">
<label class="btn btn-outline-secondary">
<input type="checkbox" value="0" />
</label>
</div>
Is there a way to change the checked status without having to manually write a click() function?