In Internet Explorer, the following code doesn't work if its called a second time
$(e.target).siblings().prev().removeAttr("checked");
Please provide all the help you can. Thank you.
In Internet Explorer, the following code doesn't work if its called a second time
$(e.target).siblings().prev().removeAttr("checked");
Please provide all the help you can. Thank you.
Removing an attribute using javascript will remove the attribute from the element permanently.
You can use $(e.target).siblings().prev().prop("checked", false);
instead. This will only update the element instead of permanently altering it.
Without getting too detailed in an already answered question, you can check out this answer on the differences between attr
and prop
in JQuery. Notably, the checked
attribute and property behave in different ways, where the attr
potentially reflects the default value while the prop
reflects the current value. In most cases (since JQuery 1.6), using .prop()
to manipulate element properties is favored.