I currently have this layout:
<div class="row">
<div class="col-lg-12">
<div class="input-group">
<div class="input-group-addon">
<input class="checkboxOption" type="checkbox">
</div>
<div class="form-control">Clinical Pharmacology (sub req'd)</div>
</div><!--input-group-->
<div class="input-group">
<div class="input-group-addon">
<input class="checkboxOption" type="checkbox">
</div>
<div class="form-control">Clinicaltrials.gov</div>
</div><!--input-group-->
</div>
</div>
and I want to be able to just click the input-group or the form-control and check the checkbox nested inside.
I currently have this in my popup.js:
$(".form-control").on("touchstart", checkInside);
function checkInside(e) {
var box = $(".input-group > .input-group-addon > .checkboxOption");
if(box.checked){
box.attr('checked', false);
} else{
box.attr('checked', true);
}
}
but when I place console.log statements in the function, it seems as if the click isn't even registering. is there another approach to this, or something else?