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

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -