I am trying to change some CSS parameters for HTML element based on the mouseOver status (true/false)
Ex:
When mouseOver=true the text color should be changed to blue
When mouseOver=false the text color should use the value in CSS file
The problem here, how I can tell the function to look into the original value in CSS file instead of passing the original value manually through the function?
Below is my code. n=the mouse status. And I am changing the visibility value based on n value.
In the IF statement, how I can tell the function to use the original value that already in CSS file?
function showitem(n) {
if (n==true) {
document.getElementById('colorstest').style.visibility = 'visible';
}
if (n==false) {
document.getElementById('colorstest').style.visibility = 'hidden';
}
}