Reputation: 3735
Using jQM v 1.4.0
I've tried to override the grayed out style (<input type="text" disabled="disabled">
) with:
input[type="text"]:disabled
{
opacity: 1.0 !important;
color: black !important;
}
But it's still greyed out and hardly visible. Any ideas?
Upvotes: 0
Views: 1901
Reputation: 24738
jQuery Mobile enhances the input and creates a textinput widget which inserts the input into a div. When disabled the DIV is assigned the class ui-state-disabled, so you can override the opacity like this:
.ui-state-disabled {
opacity: 1.0;
}
You can use the widget methods to enable/disable the input:
$("#btnEnable").on("click", function(){
$("#myText").textinput("enable");
});
$("#btnDisable").on("click", function(){
$("#myText").textinput("disable");
});
Upvotes: 3
Reputation: 597
You can use :disabled
in your css:
Edit: This way works with normal elements.. I misread sorry :/
I think this How to remove jQuery Mobile styling? will help you :)
Upvotes: 1
Reputation: 7466
You can simply use input[type="text"][disabled="disabled"]
as selector.
Upvotes: 0
Reputation: 1156
Why don't remove the "disabled" attribute to make it usable?
$('input[type="text"]').removeAttr('disabled');
Upvotes: 0