jquery ajax: closes #3249. Slight modification on serializeArray, shorter and faster code, and allows a custom form object.

This commit is contained in:
Ariel Flesler 2008-08-13 01:44:36 +00:00
parent 1023cf1d72
commit 5dc7bb7233

View File

@ -66,8 +66,7 @@ jQuery.fn.extend({
}, },
serializeArray: function() { serializeArray: function() {
return this.map(function(){ return this.map(function(){
return jQuery.nodeName(this, "form") ? return this.elements ? jQuery.makeArray(this.elements) : this;
jQuery.makeArray(this.elements) : this;
}) })
.filter(function(){ .filter(function(){
return this.name && !this.disabled && return this.name && !this.disabled &&