I am using JavaScript. I have a variable var boolVal
that either evaluates to true/false.
On my page, I have a div tag.
You can edit inline styles on a DOM element like so (height in this example):
document.getElementById("element").style.height = height + "px";
Basic syntax is:
document.getElementById("div1").style.[style property] = [value];
Syntax for the style property can vary and might not be exactly what it is in a CSS file. For example, background-color
in a CSS file would be 'backgroundColor` in the above example.