aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2011-09-20 22:18:34 -0400
committerDave Methvin <dave.methvin@gmail.com>2011-09-20 22:18:34 -0400
commitb85f222df55418c733c9639e88c0cdd5111c585b (patch)
treed9d7410a0888ed3c8b003690ee99398ae435e0c0 /test
parent3bd7bed340f9077d39734ffce366ef2caeb9ce35 (diff)
downloadjquery-b85f222df55418c733c9639e88c0cdd5111c585b.tar.gz
jquery-b85f222df55418c733c9639e88c0cdd5111c585b.zip
Don't fire change on an already-selected radio.
Thanks to Brandon Wallace (@bman654) for his code review. Also tweaks delegatetest.html output.
Diffstat (limited to 'test')
-rw-r--r--test/delegatetest.html17
1 files changed, 8 insertions, 9 deletions
diff --git a/test/delegatetest.html b/test/delegatetest.html
index ef8ea6158..f6f6a35b4 100644
--- a/test/delegatetest.html
+++ b/test/delegatetest.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
-<title>Change Tests</title>
+<title>Event Delegation Tests</title>
<script>
var version = location.search && location.search.substr(1);
if ( version ) {
@@ -66,12 +66,6 @@ th, td {
<input type="checkbox" name="mycheckbox" id="check3" disabled="disabled"/>
<label for="check3">check3</label>
</td>
- <td id="button">
- <button name="mybutton1" id="button1">Button</button><br />
- <button name="mybutton2" id="button2"><span>Button w/ child</span></button><br />
- <button name="mybutton3" id="button3" disabled="disabled">Button Disabled</button><br />
- <button name="mybutton4" id="button4" disabled="disabled"><span disabled="disabled">Button, child Disabled</span></button><br />
- </td>
<td id="radio">
<input type="radio" name="myradio" id="radio1"/>
<label for="radio1">Radio1</label><br/>
@@ -90,7 +84,12 @@ th, td {
<td id="textarea">
<textarea rows='2'></textarea>
</td>
-
+ <td id="button">
+ <button name="mybutton1" id="button1">Button</button><br />
+ <button name="mybutton2" id="button2"><span>Button w/ child</span></button><br />
+ <button name="mybutton3" id="button3" disabled="disabled">Button Disabled</button><br />
+ <button name="mybutton4" id="button4" disabled="disabled"><span disabled="disabled">Button, child Disabled</span></button><br />
+ </td>
</tr>
</thead>
<tbody>
@@ -136,7 +135,7 @@ $("#version").text(version);
$("#fileversion").text($.fn.jquery);
// Events we want to track in row-order
-var events = "bind-change live-change on-change bind-propertychange live-beforeactivate live-focusin bind-focus live-keydown live-beforedeactivate live-focusout bind-blur live-click".split(" "),
+var events = "bind-change live-change on-change bind-propertychange live-beforeactivate live-focusin bind-focus live-beforedeactivate live-focusout bind-blur live-click live-keydown".split(" "),
counter = 0;
blinker = function(event){
if ( !counter ) {