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({ ...@@ -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 &&
......
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