I am using JavaScript. I have a variable var boolVal that either evaluates to true/false. On my page, I have a div tag.
var boolVal
Something like this:
document.getElementById("MyElement").className = boolVal ? "redClass" : "blueClass";