-1

I am trying to on click of a yes radio button to fire off a check on a checkbox. It is not working though.

 $("#ctl00_ctl39_g_b36986cf_3dae_456d_938c_3e398e9272e8_ff111_ctl00_ctl00").click(function(){
 $("#ctl00_ctl39_g_b36986cf_3dae_456d_938c_3e398e9272e8_ff101_ctl00_ctl02").check=true;

Am I missing something easy here?

Thanks

user229044
  • 232,980
  • 40
  • 330
  • 338
Doms
  • 113
  • 1
  • 3
  • 15

1 Answers1

0

Am I missing something easy here?

Yes, you are. .check = true isn't how jQuery works.

You need to use .prop('checked', true).

user229044
  • 232,980
  • 40
  • 330
  • 338
  • I guess I should have asked how to uncheck it with No button. I see .prop(checked,false)option but it breaks things when i duplicate the code above with the no radio button and the false attribute. – Doms Jul 15 '14 at 02:44