X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fattributes.js;h=4393a9fdbc38a449f279d752a83e218db8ab3efb;hb=3e38a861fee065fa1a6e7678eefe90b2379fed8e;hp=ec4841bd3f4f27d271f01a5388e8fd39ca97e2e0;hpb=c7c067723006b0dfbb123c1a36885580a587d091;p=jquery.git diff --git a/src/attributes.js b/src/attributes.js index ec4841b..4393a9f 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -9,6 +9,19 @@ var rclass = /[\n\t]/g, rclickable = /^a(?:rea)?$/i, rradiocheck = /^(?:radio|checkbox)$/i; +jQuery.props = { + "for": "htmlFor", + "class": "className", + readonly: "readOnly", + maxlength: "maxLength", + cellspacing: "cellSpacing", + rowspan: "rowSpan", + colspan: "colSpan", + tabindex: "tabIndex", + usemap: "useMap", + frameborder: "frameBorder" +}; + jQuery.fn.extend({ attr: function( name, value ) { return jQuery.access( this, name, value, true, jQuery.attr ); @@ -215,6 +228,10 @@ jQuery.fn.extend({ val = ""; } else if ( typeof val === "number" ) { val += ""; + } else if ( jQuery.isArray(val) ) { + val = jQuery.map(val, function (value) { + return value == null ? "" : value + ""; + }); } if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) {