i have this select box :
<select class="slctbx condition-Combiner" onchange="updateConditionBuilder()" style="color: rgb(153, 153, 153);" disabled="disabled">
and i am using :
$('#rule-condition-listing tr:last-child .condition-Combiner').removeAttr("style","#999999").removeAttr("disabled","disabled");
so it actually removes disabled attribute but not the color attribute
.css() - Get the value of a style property for the first element in the set of matched elements or set one or more CSS properties for every matched element.
$('#rule-condition-listing tr:last-child .condition-Combiner').
css("color","#999999").
removeAttr("disabled","disabled");
or
$('#rule-condition-listing tr:last-child .condition-Combiner').
css("color","").
removeAttr("disabled","disabled");
As stated in the jquery Api documentations, the removeAttr - function only accepts 1 condition. so if you do something like
$('#rule-condition-listing tr:last-child .condition-Combiner').removeAttr("style","#999999").removeAttr("disabled","disabled");
it means that you remove the style on the element, and the '#999999' is discarded. Same goes for the disabled part.
I hope it helps.
Kind regards, Alex
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With