dimanche 29 mai 2016

jQuery .prop not updating checkbox

Been asked before but no solutions found.

Checkboxes on a CF form. The pertinent line of code is

else { 
  $('#SWSC_CC').prop('checked', true);
  $('#SWSC_CC2').val(1); 
  alert('here');
}

SWSC_CC2 is a textbox added for testing.

I hit this line. SWSC_CC2 updates to 1 (it has no value binding) and the alert pops. Checkbox never changes. I'm seeing this in a number of checkboxes in this application. DOM issues? I can think of workarounds but that's messy. No Firebug errors.




Aucun commentaire:

Enregistrer un commentaire