}
test("radio groups", function() {
- $(":radio").button();
+ $("input[type=radio]").button();
assert(":eq(0)", ":eq(1)", ":eq(2)");
// click outside of forms
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)") );
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)") );
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" ) );
});
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";
$.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() {