This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Object Background's depending of value
#4
1. Add status-btn to button's Additional classes.
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%);
}
3. Add this to Custom JavaScript, change 1/1/1 to button group address:
Code:
$(function(){
  if (typeof grp != 'undefined') {
    grp.listen('1/1/1', function(object, state) {
      $('.status-btn').toggleClass('on', object.value);
    });
  }
});
Reply


Messages In This Thread
RE: Object Background's depending of value - by admin - 22.05.2017, 06:13

Forum Jump: