diff options
-rw-r--r-- | tests/unit/button/button_core.js | 6 | ||||
-rw-r--r-- | tests/unit/button/button_tickets.js | 2 | ||||
-rw-r--r-- | ui/jquery.ui.button.js | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/unit/button/button_core.js b/tests/unit/button/button_core.js index 0d93ecedf..c274a8473 100644 --- a/tests/unit/button/button_core.js +++ b/tests/unit/button/button_core.js @@ -34,7 +34,7 @@ function assert(noForm, form1, form2) { } test("radio groups", function() { - $(":radio").button(); + $("input[type=radio]").button(); assert(":eq(0)", ":eq(1)", ":eq(2)"); // click outside of forms @@ -61,7 +61,7 @@ test("buttonset", function() { var set = $("#radio1").buttonset(); ok( set.is(".ui-buttonset") ); deepEqual( set.children(".ui-button").length, 3 ); - deepEqual( set.children("input:radio.ui-helper-hidden-accessible").length, 3 ); + deepEqual( set.children("input[type=radio].ui-helper-hidden-accessible").length, 3 ); ok( set.children("label:eq(0)").is(".ui-button.ui-corner-left:not(.ui-corner-all)") ); ok( set.children("label:eq(1)").is(".ui-button:not(.ui-corner-all)") ); ok( set.children("label:eq(2)").is(".ui-button.ui-corner-right:not(.ui-corner-all)") ); @@ -76,7 +76,7 @@ test("buttonset (rtl)", function() { set = $("#radio1").buttonset(); ok( set.is(".ui-buttonset") ); deepEqual( set.children(".ui-button").length, 3 ); - deepEqual( set.children("input:radio.ui-helper-hidden-accessible").length, 3 ); + deepEqual( set.children("input[type=radio].ui-helper-hidden-accessible").length, 3 ); ok( set.children("label:eq(0)").is(".ui-button.ui-corner-right:not(.ui-corner-all)") ); ok( set.children("label:eq(1)").is(".ui-button:not(.ui-corner-all)") ); ok( set.children("label:eq(2)").is(".ui-button.ui-corner-left:not(.ui-corner-all)") ); diff --git a/tests/unit/button/button_tickets.js b/tests/unit/button/button_tickets.js index 624d16716..43bfdb833 100644 --- a/tests/unit/button/button_tickets.js +++ b/tests/unit/button/button_tickets.js @@ -7,7 +7,7 @@ module( "button: tickets" ); test( "#5946 - buttonset should ignore buttons that are not :visible", function() { $( "#radio01" ).next().andSelf().hide(); - var set = $( "#radio0" ).buttonset({ items: ":radio:visible" }); + var set = $( "#radio0" ).buttonset({ items: "input[type=radio]:visible" }); ok( set.find( "label:eq(0)" ).is( ":not(.ui-button):not(.ui-corner-left)" ) ); ok( set.find( "label:eq(1)" ).is( ".ui-button.ui-corner-left" ) ); }); diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index f84d748cf..bd0af9408 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -216,7 +216,7 @@ $.widget( "ui.button", { if ( this.element.is(":checkbox") ) { this.type = "checkbox"; - } else if ( this.element.is(":radio") ) { + } else if ( this.element.is("[type=radio]") ) { this.type = "radio"; } else if ( this.element.is("input") ) { this.type = "input"; @@ -358,7 +358,7 @@ $.ui.button.version = "@VERSION"; $.widget( "ui.buttonset", { options: { - items: ":button, :submit, :reset, :checkbox, :radio, a, :data(button)" + items: ":button, :submit, :reset, :checkbox, [type=radio], a, :data(button)" }, _create: function() { |