So how do you access all of the checkboxes?
1: $('.chkAllSelector > input:checkbox').click(function() {
2: $('.chkRowSelector > input:checkbox').each(
3: function(){
4: this.checked = $('.chkAllSelector > input:checkbox').attr('checked');
5: }
6: );
7: });
8: $('.chkRowSelector > input:checkbox').click(function() {
9: if ($('.chkAllSelector > input:checkbox').is(':checked') && !($(this).is(':checked')))
10: { $('.chkAllSelector > input:checkbox').removeAttr('checked'); }
11: });
No comments:
Post a Comment