0

Good morning, What I need to do is, when the client click on a checkbox I need to revert that action in some scenarios but doing this.

 $("#foo").attr('checked');
 or
 $("#foo").attr('checked', 'checked');
 or
 $("#foo").attr('checked', true);

And looking with the firebug indeed the checked is marked, but still visually does not change, and there´s no check on the component.

Any idea how to make it works

Korashen
  • 1,974
  • 2
  • 17
  • 22
paul
  • 11,696
  • 19
  • 81
  • 134

1 Answers1

1

try this

 $("#foo").prop('checked', true);

Documentation Here

Orelsanpls
  • 20,654
  • 4
  • 36
  • 61