asked on April 26, 2017
Hello I have a request from a customer to have checkboxes of a same field that are nested in a table row automatically fill if one of the selections is checked. For instance in the image: if All Meals is selected they would like the other check boxes to also be checked automatically.
I have been able to do this with a field outside of the table using the following code
$(document).ready (function () { function checkbox() { $('.checkbox input:checked').each(function () { if ($(this).val() == "choice1") { $('.checkbox input').prop('checked', true); } }); } $('.checkbox').change(checkbox) });
But I am not quite sure how to go about nesting this within the table. Anyone have any thoughts?
0
0