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

Commit 2e21c6b

Browse files
author
Gabriel Schulhof
committed
[button] Implement _setOption() -- Fixes #4317
1 parent 7273a5e commit 2e21c6b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

js/widgets/forms/button.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,18 @@ $.widget( "mobile.button", $.mobile.widget, {
119119
this.refresh();
120120
},
121121

122+
_setOption: function( key, value ) {
123+
var op = {};
124+
125+
op[ key ] = value;
126+
if ( key !== "initSelector" ) {
127+
this.button.buttonMarkup( op );
128+
// Record the option change in the options and in the DOM data-* attributes
129+
this.element.attr( "data-" + ( $.mobile.ns || "" ) + ( key.replace( /([A-Z])/, "-$1" ).toLowerCase() ), value );
130+
}
131+
this._super( "_setOption", key, value );
132+
},
133+
122134
enable: function() {
123135
this.element.attr( "disabled", false );
124136
this.button.removeClass( "ui-disabled" ).attr( "aria-disabled", false );

0 commit comments

Comments
 (0)