From: Gilles van den Hoven Date: Tue, 27 Jun 2006 21:26:25 +0000 (+0000) Subject: bah, forgot to test it, this is the fix X-Git-Tag: 1.0a~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b5a1e0c8a6f06ae774e3d461f8d499a8049d9383;p=jquery.git bah, forgot to test it, this is the fix --- diff --git a/form/form.js b/form/form.js index bec88706a..640437444 100644 --- a/form/form.js +++ b/form/form.js @@ -198,9 +198,7 @@ $.fn.serialize = function() { if ((p == 'SELECT' || p == 'OPTGROUP') && !this.selected) return; var n = this.name; - if (!n && p == 'OPTGROUP' && (par = par.parentNode)) - n = par.name; - + if (!n) n = (p == 'OPTGROUP') ? par.parentNode.name : par.name; if (n == undefined) return; a.push({name: n, value: this.value});