Page 1 of 1

Can the tile color be changed dynamically

Posted: Thu May 03, 2018 4:38 am
by MonkeyDesk
Hello Forum.

I've been having a lot of fun with metroui and was wondering if there is a way to dynamically change the color of a tile in js. Something like this:

if (myObj.onoff == "ON")
{
document.getElementById("tile1").style ="background-color: #4a00b3";
}
else if (myObj.onoff == "OFF")
{
document.getElementById("tile1").style="background-color: #2a50b3";
}

Thanks

Re: Can the tile color be changed dynamically

Posted: Thu May 03, 2018 10:25 am
by olton