Logic Machine Forum
Circleslider change Slider color - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: Circleslider change Slider color (/showthread.php?tid=2120)



Circleslider change Slider color - alberto.mendoza - 18.06.2019

Hi everyone!

I'm new in the forum so I dont know if this question has been made before. 

I have to change the color of the circleslider (which I use for the temperature of a room) when a GA change it's value between "true" or false"
I've tried to do this with CSS but I couldn't, therefore I tried to do this with JS, nevertheless I don't know how access to the color of the circleslider.

Someone has any idea? 

Thanks!


RE: Circleslider change Slider color - admin - 18.06.2019

See this post: https://forum.logicmachine.net/showthread.php?tid=1717&pid=12060#pid12060


RE: Circleslider change Slider color - Daniel - 18.06.2019

Or you can do it like that with a bit object

Additional class slilder-custom
JS

Code:
$(function() {
 if (typeof grp != 'object') {
   return;
 }

 grp.listen('1/1/1', function(object, state) {
   $('.slilder-custom').toggleClass('change-slider-colour', object.value == true);
 });
});
CSS
Code:
.change-slider-colour {
 filter: hue-rotate(50deg);
}