17.11.2021, 12:05
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
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
});
Best Regards,