mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-02 03:44:43 +00:00
Merge pull request #2711 from Wilto/disabled-sliders-selects
Fixes #2541 — Properly applies “disabled” styling and logic to custom form inputs. Thanks Wilto!
This commit is contained in:
commit
d869cab1f0
2 changed files with 6 additions and 2 deletions
|
|
@ -122,7 +122,7 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
}
|
||||
|
||||
// Disable if specified
|
||||
if ( options.disabled ) {
|
||||
if ( options.disabled || this.element.attr('disabled')) {
|
||||
this.disable();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -215,7 +215,11 @@ $.widget( "mobile.slider", $.mobile.widget, {
|
|||
},
|
||||
|
||||
refresh: function( val, isfromControl, preventInputUpdate ) {
|
||||
if ( this.options.disabled ) { return; }
|
||||
|
||||
if ( this.options.disabled || this.element.attr('disabled')) {
|
||||
this.slider.addClass('ui-disabled');
|
||||
return;
|
||||
}
|
||||
|
||||
var control = this.element, percent,
|
||||
cType = control[0].nodeName.toLowerCase(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue