Setting dialBackgroundColor based on Day/Night
paolobriones opened this issue · comments
Paolo Briones commented
After instantiating the thooClock, is it possible to set the dialBackgroundColor to another color on the onEverySecond() function?
Thomas Haaf commented
Its not possible to set the color from outside the plugin like this. It would be possible to destroy the plugin and re initialize it with the new color, a dirty solution would be:
assume in your html:
<div id="myclock"></div>
<button id="changecolor">change BG color</button>
$(document).ready(function(){
$('#myclock').thooClock({dialBackgroundColor:'#FFCC74'}); // old color while init
$('#changecolor').on('click', function(){
$('#myclock').html('').thooClock({dialBackgroundColor:'green'}) // set new color
});
.... rest of the code
Paolo Briones commented
gotcha, it isnt exactly what i was hoping for, will have to find a different way to change the dial color.
Thanks!