Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit cac84d1

Browse files
Checkboxradio: Theme inheritance via CSS. Don't add btn theme class unless it a theme has been set.
1 parent 3650c85 commit cac84d1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

js/widgets/forms/checkboxradio.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, $.extend( {
4646
}
4747

4848
// Establish options
49-
// If there's no selected theme check the data attr
50-
if ( !o.theme ) {
51-
o.theme = "a";
52-
}
5349
o.mini = inheritAttr( input, "mini" ) || o.mini;
5450

5551
// Expose for other methods
@@ -201,7 +197,9 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, $.extend( {
201197
},
202198

203199
_setTheme: function( value ) {
204-
this.label.removeClass( "ui-btn-" + this.options.theme ).addClass( "ui-btn-" + value );
200+
if ( value ) {
201+
this.label.removeClass( "ui-btn-" + this.options.theme ).addClass( "ui-btn-" + value );
202+
}
205203
},
206204

207205
_setMini: function( value ) {

0 commit comments

Comments
 (0)