Ok so I need to be able to click any element inside .modal-interest, and it for it to check the child-element checkbox when they are clicked.
Currently, it seems to work for the first click - but for every subsequent click, even though the code is supposed to be checking the checkbox, it does nothing.
$('.modal-interest strong').click(function (e) {
input = $(this).closest('.modal-interest').find('input');
if (input.prop('checked')) {
input.attr('checked', false).change();
} else {
input.attr('checked', true).change();
}
});
An accurate representation of my problem can be seen on the following fiddle:
Stuck with this and would appreciate any help!