X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fajax.js;h=7e024a319732d41f18cfa79b27d29ac10f67a2c7;hb=325755d4b38e87b13f9c24a4c2991ec497552aad;hp=e4545335e895823e31fa9712e0857b061121c4d5;hpb=5dc7bb7233efee125922cc63e286c96a73b9326c;p=jquery.git diff --git a/src/ajax.js b/src/ajax.js index e454533..7e024a3 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -76,7 +76,7 @@ jQuery.fn.extend({ .map(function(i, elem){ var val = jQuery(this).val(); return val == null ? null : - val.constructor == Array ? + jQuery.isArray(val) ? jQuery.map( val, function(val, i){ return {name: elem.name, value: val}; }) : @@ -504,7 +504,7 @@ jQuery.extend({ // If an array was passed in, assume that it is an array // of form elements - if ( a.constructor == Array || a.jquery ) + if ( jQuery.isArray(a) || a.jquery ) // Serialize the form elements jQuery.each( a, function(){ add( this.name, this.value ); @@ -515,7 +515,7 @@ jQuery.extend({ // Serialize the key/values for ( var j in a ) // If the value is an array then the key names need to be repeated - if ( a[j] && a[j].constructor == Array ) + if ( jQuery.isArray(a[j]) ) jQuery.each( a[j], function(){ add( j, this ); });