Ticket #6341 (closed bug: fixed)
$.attr(name, null) is inconsistent across browsers
|Reported by:||DouglasMeyer||Owned by:|
Running $(...).attr(name, null) is inconsistent across browsers. From what I can tell, most browsers (firefox/chrome) will remove the attribute; while ie (8) will set it to "null". For me this wasn't expected behavior, I expected the attribute to be removed (same as removeAttr).
#3058 was rejected because it was proposed as an enhancement (and the underlying bug wasn't apparent). In #2548 flesler says passing null should be a setting (not getting) operation, but doesn't divulge what the attribute should be set to. I'll get a diff soon.