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

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -