Hacker News new | ask | show | jobs
by timdown 5511 days ago
This release is a fudge, and a partial backwards step. The jQuery team seem uncertain about what the prop()/attr() change is trying to achieve (an uncertainty that probably stems from the uncertainty underlying the whole attr() method in the first place). The result is that the situation is even more confusing than ever, judging by the release notes: a list of properties for which you can only use prop() and then a recommendation that for everything else you should use attr(). Really?? Then what the hell was the point of this change? Having gone as far as acknowledging that properties are not attributes and supposedly separating how they are dealt with, they then continue to recommend using attr() even though properties are almost always what you actually want and there is now a dedicated prop() method for dealing with them? I'm now genuinely baffled as to what this change was supposed to achieve, and average jQuery users are going to be seriously confused by the messages coming from jQuery on this.