aboutsummaryrefslogtreecommitdiffstats
path: root/src/event
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2007-09-05 17:06:05 +0000
committerJohn Resig <jeresig@gmail.com>2007-09-05 17:06:05 +0000
commitf96bf1041553775a94c1034c97e253e350217173 (patch)
treeec325ec45526f3caddac0157f98645ca7aaad64c /src/event
parentf28f199dc0a353135ef8b9afa2f3d25c6ffd2c75 (diff)
downloadjquery-f96bf1041553775a94c1034c97e253e350217173.tar.gz
jquery-f96bf1041553775a94c1034c97e253e350217173.zip
Integration of Mike Alsup's excellent form serialization code. The benefits are as follows:
- New method: .serializeArray() This returns an array of name/value pairs representing the contents of a form, or individual input elements. - Enhancement: .serialize() The results are correct now (as opposed to the mess from before), and allows you to serializes forms directly (rather than just the input elements). - Enhancement: .val() This now returns the correct value when dealing wih selects. Additionally, when dealing with multiple selects, it returns an array of values. Based upon Mike's code: http://malsup.com/jquery/form/comp/form.js and test suite: http://malsup.com/jquery/form/comp/test.html
Diffstat (limited to 'src/event')
-rw-r--r--src/event/eventTest.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/event/eventTest.js b/src/event/eventTest.js
index cacfdeb66..334f286c7 100644
--- a/src/event/eventTest.js
+++ b/src/event/eventTest.js
@@ -42,7 +42,7 @@ test("bind()", function() {
function selectOnChange(event) {
equals( event.data, counter++, "Event.data is not a global event object" );
};
- $("select").each(function(i){
+ $("#form select").each(function(i){
$(this).bind('change', i, selectOnChange);
}).trigger('change');