Fix #10773. Improve parameter handling in removeAttr.

This commit is contained in:
Oleg
2011-11-13 12:10:21 +04:00
committed by Dave Methvin
parent fa96f4bdee
commit a467aa0a77
2 changed files with 38 additions and 25 deletions

View File

@@ -355,12 +355,12 @@ jQuery.extend({
var propName, attrNames, name, l,
i = 0;
if ( elem.nodeType === 1 ) {
attrNames = ( value || "" ).split( rspace );
if ( value && typeof value === "string" && elem.nodeType === 1 ) {
attrNames = jQuery.trim( value ).toLowerCase().split( " " );
l = attrNames.length;
for ( ; i < l; i++ ) {
name = attrNames[ i ].toLowerCase();
name = attrNames[ i ];
propName = jQuery.propFix[ name ] || name;
// See #9699 for explanation of this approach (setting first, then removal)