I had problems (strange anomalies) with checking and unchecking checkboxes with JQuery. I was using .attr
and .removeAttr
and when I changed it to .prop('checked',false/true)
I resolved the problem.
Before jQuery 1.6, the .attr() method sometimes took property values into account when retrieving some attributes, which could cause inconsistent behavior. As of jQuery 1.6, the .prop() method provides a way to explicitly retrieve property values, while .attr() retrieves attributes. Reference:
Note you should be using JQuery 1.6 +
.