29.06.2022, 08:04
Add to custom CSS:
Modify custom JS like this:
Code:
@keyframes blinker {
from {opacity: 1.0;}
to {opacity: 0.0;}
}
.blink{
animation-name: blinker;
animation-duration: 0.6s;
animation-iteration-count: infinite;
animation-timing-function: ease-in-out;
animation-direction: alternate;
}
Modify custom JS like this:
Code:
$(function() {
$('.color-by-value').each(function(_, el) {
var addr = $(el).data('object');
if (addr) {
grp.listen(addr, function(obj) {
var color;
if (obj.value) {
color = 'red';
}
else {
color = 'Green';
}
$(el).css('color', color).toggleClass('blink', obj.value);
});
}
});
});