I just read jQuery 3.0's breaking changes, and I think this should be known by all front-end engineers.
e.g. Questions, 1. how to uncheck a checkbox? 2. how to remove checked from radio button?
$('input').prop('checked', false);
I just read jQuery 3.0's breaking changes, and I think this should be known by all front-end engineers.
e.g. Questions, 1. how to uncheck a checkbox? 2. how to remove checked from radio button?
$('input').prop('checked', false);
It is almost always a mistake to use .removeAttr( "checked" ) on a DOM element. The only time it might be useful is if the DOM is later going to be serialized back to an HTML string. In all other cases, .prop( "checked", false ) should be used instead.
https://jquery.com/upgrade-guide/3.0/#feature-new-signature-for-jquery-get-and-jquery-post