aboutsummaryrefslogtreecommitdiffstats
path: root/tests/visual
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2013-02-09 03:25:47 +0100
committerFelix Nagel <info@felixnagel.com>2013-02-09 03:25:47 +0100
commit110cab160e350c072702fed45ceac6cefae61992 (patch)
tree8d85b76b50789459af78e9e6bfdc6bbadd3c7877 /tests/visual
parent9719719e60f39b24142e79daf4e60238b34d62a0 (diff)
downloadjquery-ui-110cab160e350c072702fed45ceac6cefae61992.tar.gz
jquery-ui-110cab160e350c072702fed45ceac6cefae61992.zip
Selectmenu tests: remove toggle event as its removed
Diffstat (limited to 'tests/visual')
-rw-r--r--tests/visual/selectmenu/disabled_empty.html41
1 files changed, 27 insertions, 14 deletions
diff --git a/tests/visual/selectmenu/disabled_empty.html b/tests/visual/selectmenu/disabled_empty.html
index 6a484ff3c..6a5f02d14 100644
--- a/tests/visual/selectmenu/disabled_empty.html
+++ b/tests/visual/selectmenu/disabled_empty.html
@@ -20,25 +20,38 @@
$('select#disabled3').selectmenu();
var disabled4 = $('select#disabled4').selectmenu();
- $("#disable_select").toggle( function() {
- disabled4.selectmenu("disable");
- }, function() {
- disabled4.removeAttr("disabled");
+ $("#disable_select").on("click", function() {
+ if (disable_select) {
+ disable_select = false;
+ disabled4.selectmenu("disable");
+ } else {
+ disable_select = true;
+ disabled4.removeAttr("disabled");
+ }
disabled4.selectmenu("refresh");
+ return false;
});
- $("#disable_option").toggle( function() {
- disabled4.find("option:eq(0)").attr("disabled", "disabled");
- disabled4.selectmenu("refresh");
- }, function() {
- disabled4.find("option:eq(0)").removeAttr("disabled");
+ $("#disable_option").on("click", function() {
+ if (disable_option) {
+ disable_option = false;
+ disabled4.find("option:eq(0)").attr("disabled", "disabled");
+ } else {
+ disable_option = true;
+ disabled4.find("option:eq(0)").removeAttr("disabled");
+ }
disabled4.selectmenu("refresh");
+ return false;
});
- $("#disable_optgroup").toggle( function() {
- disabled4.find("optgroup:eq(0)").attr("disabled", "disabled");
- disabled4.selectmenu("refresh");
- }, function() {
- disabled4.find("optgroup:eq(0)").removeAttr("disabled");
+ $("#disable_optgroup").on("click", function() {
+ if (disable_optgroup) {
+ disable_optgroup = false;
+ disabled4.find("optgroup:eq(0)").attr("disabled", "disabled");
+ } else {
+ disable_optgroup = true;
+ disabled4.find("optgroup:eq(0)").removeAttr("disabled");
+ }
disabled4.selectmenu("refresh");
+ return false;
});
/* empty */