i agree with matt on this 100%.

an attr() method should return the attribute's value, always. there
are way too many common cases when interpretation would make this
method unreliable and unusable. making something that has so much
functionality overlap with css() is not good at all, especially when
it is both a getter and a setter. attr('width') would get the computed
width but attr('width', '5') sets the width attribute? there's too
much room for ambiguity in my opinion.

if anything it is much more confusing for beginners, not easier...when
an attr() method returns NOT the value of attr, and will cause MANY
more problems than is solves. when you're a beginner, you dont need
magic methods with names that imply specific strict functionality.

you can introduce a new method..maybe getComputed(), .computed() or
something similar.

Leon

--

You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to