jquery ajax: closes #3249. Slight modification on serializeArray, shorter and faster...
authorAriel Flesler <aflesler@gmail.com>
Wed, 13 Aug 2008 01:44:36 +0000 (01:44 +0000)
committerAriel Flesler <aflesler@gmail.com>
Wed, 13 Aug 2008 01:44:36 +0000 (01:44 +0000)
src/ajax.js

index bda79b5..e454533 100644 (file)
@@ -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 &&