React Checkbox not sending onChange
To get the checked state of your checkbox the path would be: The alternative is to get it from the event passed into the handleChange method:
To get the checked state of your checkbox the path would be: The alternative is to get it from the event passed into the handleChange method:
For jQuery 1.6+ : .attr() is deprecated for properties; use the new .prop() function instead as: For jQuery < 1.6: To check/uncheck a checkbox, use the attribute checked and alter that. With jQuery you can do: Cause you know, in HTML, it would look something like: However, you cannot trust the .attr() method to get the value of the checkbox … Read more