.attr and value of undefined attributes
I have a suggestion based on the assumption, which I think is correct but feel free to prove me wrong, that the .attr() method returns "undefined" in two different cases:
1) when the attribute is actually not present in the dom element
2) when it is present but it has no value, think for example <input type="text" disabled/> which I not is not standard HTML but I've seen it pretty often...
wouldn't it be better to return undefined only in the first case, and return null in the second case? In this way, it'd be clear that the attribute is set but no value is specified.