Hey everyone -

I stumbled across a point of optimization today, all of the following
attributes (and probably more - let me know) can only have a single
value.

checked="checked"
multiple="multiple"
disabled="disabled"
readonly="readonly"
disabled="disabled"
selected="selected"

I'd like to add in methods like:
.checked( true | false )

Which does this in the background (but for each attribute):

$.fn.checked = function(b) {
    if ( b )
        this.attr( "checked", "checked" );
    else
        this.removeAttr( "checked" );
};

What do you think?

--John

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to