In core we still have line like

$("input").attr("disabled", ''); //bad

A least it should be

$("input").attr("disabled", false);

But .prop is made for properties, we should use it. http://api.jquery.com/prop/.

# Careful when you want to set to false.
To set a native property to false use

$("input").prop("disabled", false);

You can not add the property again if you use removeProp on native properties.

$("input").removeProp("disabled", false);

Comments

gagarine’s picture

nod_’s picture

Status: Active » Closed (fixed)

That happened when we upgraded to jQuery 1.9.