diff options
author | Ariel Flesler <aflesler@gmail.com> | 2008-08-13 01:44:36 +0000 |
---|---|---|
committer | Ariel Flesler <aflesler@gmail.com> | 2008-08-13 01:44:36 +0000 |
commit | 5dc7bb7233efee125922cc63e286c96a73b9326c (patch) | |
tree | 169adf84ec243f74e52d1e41b889ed3d2e6b1e35 | |
parent | 1023cf1d72a3bfe56cbbf8ef89ad96725639e066 (diff) | |
download | jquery-5dc7bb7233efee125922cc63e286c96a73b9326c.tar.gz jquery-5dc7bb7233efee125922cc63e286c96a73b9326c.zip |
jquery ajax: closes #3249. Slight modification on serializeArray, shorter and faster code, and allows a custom form object.
-rw-r--r-- | src/ajax.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ajax.js b/src/ajax.js index bda79b50a..e4545335e 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -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 && |