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
  • 2,144
  • 2
  • 18
  • 28
paul
  • 12,873
  • 23
  • 91
  • 153

1 Answers1

1

try this

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

Documentation Here

Orelsanpls
  • 22,456
  • 6
  • 42
  • 69