Many sites now use various means to update their version of jQuery to a later version than 1.4, the version in Drupal 7.

jQuery deprecated (version 1.6) and removed (version 1.9) the use of .attr() for use to set "checked" and "disabled" properties. It also points out that attempting to retrieve values by using .attr() will result in confusion/problems, as in this example: $elem.attr("checked"); will return true if $elem has a "checked" property at all, not if it is true.

jQuery now uses .prop() instead to set and retrieve the value of a "checked" or "disabled" properties of a node.

.removeAttr() may also cause problems/unexpected behavior, as it completely removes the property rather than setting it to false, consequently it will no longer be selectable by selectors that typically would work. 
Example: 
Using <code>jQuery('input[name="test"]').removeAttr('checked');

on <input name="test" type="checkbox" checked="true" /> will result in <input name="test" type="checkbox" />. This is typically not the intended result, as it will cause CSS and jQuery selectors that you would expect to be able to find that item to fail.
Example: jQuery('input[checked]') will now fail to return this node.

See: jQuery 1.9 Upgrade Guide: attr vs. prop

potential problems in the cck_phone module:

file: cck_phone\cck_phone.js

  1. Line 45: checkboxes.attr('checked', true);
  2. Line 49: checkboxes.attr('checked', false);
  3. Line 70: // .attr('checked', 'checked') (only if uncommented at a later time...)

Comments

DrCord’s picture