jquery - onclick check checkboxes by name -
how make js code work checkboxes within td id="sel";
$(document).ready(function() { $('input[name="selector"]').click(function() { $("#sel :checkbox").attr('checked', $(this).is(':checked')); }); });
try this
$(document).ready(function() { $('input[name="selector"]').click(function() { $("#sel input:checkbox").attr('checked', $(this).is(':checked')); }); });
Comments
Post a Comment