aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/button/button_methods.js
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2010-07-30 14:26:58 +0200
committerjzaefferer <joern.zaefferer@gmail.com>2010-07-30 14:26:58 +0200
commitea58cd5ac0d852a9c7d7ceadbcbb74006cf9052d (patch)
tree35cff2c8f0505cf9b5430b33df0ff7ab5c85dc59 /tests/unit/button/button_methods.js
parentb3940d2f78dfcc37792ceb97e5659b78f156794c (diff)
downloadjquery-ui-ea58cd5ac0d852a9c7d7ceadbcbb74006cf9052d.tar.gz
jquery-ui-ea58cd5ac0d852a9c7d7ceadbcbb74006cf9052d.zip
Use pushStack in widget method. Fixes #5732 - make the widget method maintain the stack
Diffstat (limited to 'tests/unit/button/button_methods.js')
-rw-r--r--tests/unit/button/button_methods.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/unit/button/button_methods.js b/tests/unit/button/button_methods.js
index a83a73ba4..5197bc40c 100644
--- a/tests/unit/button/button_methods.js
+++ b/tests/unit/button/button_methods.js
@@ -16,4 +16,18 @@ test("destroy", function() {
equal( afterHtml, beforeHtml );
});
+test("widget", function() {
+ var submit = $("#submit").button();
+ same(submit.button("widget")[0], submit[0]);
+ same(submit.button("widget").end()[0], submit[0]);
+
+ var check = $("#check").button();
+ same(check.button("widget")[0], check.next("label")[0]);
+ same(check.button("widget").end()[0], check[0]);
+
+ var radio = $("#radio01").button();
+ same(radio.button("widget")[0], radio.next("label")[0]);
+ same(radio.button("widget").end()[0], radio[0]);
+});
+
})(jQuery);