From 5dc7bb7233efee125922cc63e286c96a73b9326c Mon Sep 17 00:00:00 2001 From: Ariel Flesler Date: Wed, 13 Aug 2008 01:44:36 +0000 Subject: [PATCH] jquery ajax: closes #3249. Slight modification on serializeArray, shorter and faster code, and allows a custom form object. --- src/ajax.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ajax.js b/src/ajax.js index bda79b50..e4545335 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 &&