angularjs - How to uncheck checkboxes using Typescript and Jquery -
i have group of check boxes class 'types'. have button on page should select , unselect checkboxes in group
checking boxes works this:
$('.types').attr('checked', 'true'); unchecking boxes doesn't work:
$('.types').attr('checked', 'false'); unchecking boxes throws error:
$('.types').attr('checked', false); error: argument of type 'false' not assignable parameter of type '(index: number, attr: string) => string | number'
is there way work around this?
for newer versions of jquery, need use this.
$('.checkbox').prop('checked', false);
Comments
Post a Comment