![]() |
|
change the opacity of a text - Printable Version +- LogicMachine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: change the opacity of a text (/showthread.php?tid=3688) |
change the opacity of a text - khalil - 17.11.2021 hello I used this JS code to change the objects to read only and change the opacity, but it didnt change the opacity of a text how to make it work in text also Code: $(function(){
grp.listen('32/1/1', function(object) {
if (object.value == true ) {
$(".lockbyknx").addClass("item-read-only");
$(".lockbyknx").find('img').css("opacity", 0.5);
} else if (object.value == false ) {
$(".lockbyknx").removeClass("item-read-only");
$(".lockbyknx").find('img').css("opacity", 1);
}
}, true); // set to true to send on same value
});RE: change the opacity of a text - admin - 18.11.2021 Custom JS: Code: $(function(){
grp.listen('32/1/1', function(object) {
$(".lockbyknx").toggleClass("item-read-only", object.value == true);
}, true); // set to true to send on same value
});Custom CSS: Code: .item-read-only {
opacity: 0.5 !important;
}RE: change the opacity of a text - khalil - 18.11.2021 Thanks admin But it changed the opacity of all read only values I want to change the opacity of values with "lockbyknx" regards, edit: I changed the CC Code: /* Change Opacity*/
.lockbyknx {
opacity: 0.3 !important;
}RE: change the opacity of a text - admin - 18.11.2021 Use this: Code: .lockbyknx.item-read-only {
opacity: 0.5 !important;
}RE: change the opacity of a text - khalil - 18.11.2021 (18.11.2021, 12:02)admin Wrote: Use this: thanks admin Direct Input - sjfp - 08.12.2021 How can I remove the + and - button from a direct input box ? RE: change the opacity of a text - admin - 08.12.2021 This will hide buttons from all input boxes: Code: .control-spinner .btn { display: none; } |