-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Disabling form elements: misleading documentation #6528
Comments
@popolla I've just tried your code in context, and this seems to work: http://jsbin.com/aSuSaCo/1/edit |
Thanks Anne but your test only works because the disabled property is added before the markup gets enhanced. |
@popolla thanks for the clarification, and reopening for now. |
Form widgets have a |
That's exactly what I meant. Thank you for being so productive on Sunday! |
The current documentation reads: "All jQuery Mobile widgets can be disabled in the markup by adding the standard disabled attribute to the element, just like you would with native controls".
That's mostly untrue for disabled attributes set via JavaScript. For example, the following code doesn't work properly (the form element will be styled as enabled):
var myselect = $( "#selectfoo" );
myselect.prop( "disabled" , true );
myselect.selectmenu( "refresh" );
Same problem if you try to unset the disabled property that way.
Using attr() method instead of prop() makes no difference.
The text was updated successfully, but these errors were encountered: