jQuery checked attr jQuery 1.5 to 1.6.4

If you have jQuery code that reads the .attr("checked") and you upgrade from 1.5 to 1.6.4, you should read this:

http://ejohn.org/blog/jquery-16-and-attr/

In summary, if you were relying on .attr("checked") returning true or false, the behavior has changed with 1.6 as it now returns "checked" or "". The problem being that JavaScript will equate both "checked" and "" as true in an if statement.

Comments are closed