REVISED
"data-togle="tab"
click event triggers a preventDefault()
function within bootstrap.js
. Since your checkbox
is nested inside an a[data-toggle="tab"]
, clicking on it actually registers as a click on the <a>
element, resulting in the prevention of the click event by bootstrap.
If you wish to keep the checkbox within a data-toggle="tab"
, you will need to implement additional JavaScript logic to manually toggle its state. Consider this approach:
$('[data-toggle="tab"]').click(function() {
var isChecked = $(this).find(':checkbox').prop('checked');
$(this).find(':checkbox').prop('checked', !isChecked);
})