22.05.2017, 06:13
1. Add status-btn to button's Additional classes.
2. Add this to Custom CSS, adjust colors as needed:
3. Add this to Custom JavaScript, change 1/1/1 to button group address:
2. Add this to Custom CSS, adjust colors as needed:
Code:
.status-btn.on {
color: #fff;
border-color: #900;
background: #c00;
background: -webkit-linear-gradient(#a00 0%, #b00 100%);
background: linear-gradient(#a00 0%, #b00 100%);
}
Code:
$(function(){
if (typeof grp != 'undefined') {
grp.listen('1/1/1', function(object, state) {
$('.status-btn').toggleClass('on', object.value);
});
}
});