I have some buttons which have a hover effect which makes the button color darker on hover ( with css ).
When the user clicks on those buttons, i disable them via javascript.
when i want the procedure ( game ) to start again and i re-enable the buttons via javascript, the css button: hover effect does not work any more.
Any solutions?
the javascript enable/disable button functions are:
function jsEnableElement(id) {
if ( document.getElementById(id) ) {
document.getElementById(id).style.background = "#3399FF";
document.getElementById(id).style.cursor = "pointer";
document.getElementById(id).disabled = false;
}
}
function jsDisableElement(id) {
if ( document.getElementById(id) ) {
document.getElementById(id).style.background = "#DDDDDD";
document.getElementById(id).style.cursor = "default";
document.getElementById(id).disabled = true;
}
}