Commit 5dc7bb72 authored by Ariel Flesler's avatar Ariel Flesler

jquery ajax: closes #3249. Slight modification on serializeArray, shorter and...

jquery ajax: closes #3249. Slight modification on serializeArray, shorter and faster code, and allows a custom form object.
parent 1023cf1d
......@@ -66,8 +66,7 @@ jQuery.fn.extend({
},
serializeArray: function() {
return this.map(function(){
return jQuery.nodeName(this, "form") ?
jQuery.makeArray(this.elements) : this;
return this.elements ? jQuery.makeArray(this.elements) : this;
})
.filter(function(){
return this.name && !this.disabled &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment