I think it has already been brought up that this will not work as
expected but ... here it goes again ...

These attributes are used to set the 'default' value and are
thereafter ignored in favor of the JS object's properties. At least
that is how I understand it.

--
Brandon Aaron


On 10/2/06, John Resig <[EMAIL PROTECTED]> wrote:
> 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/
>

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

Reply via email to