this is my code in JavaScript:
var changeIdValue = function(id, value) {
document.getElementById(id).style.height = value;
};
document.getElementById (\"ba
document.activeElement is whatever element has focus. You'll often find both spacebar and enter firing click on the focused element.
document.body.onkeyup = function(e){
if(e.keyCode == 32 || e.keyCode == 13){
//spacebar or enter clicks focused element
try {
doc.activeElement.click();
}
catch (e) {
console.log(e);
}
}
};
Then the CSS might be:
.focusable-thing:hover {
cursor: pointer;
}
.focusable-thing:focus {
-webkit-box-shadow: 0px 2px 8px 2px rgba(0,0,0,0.4);
-moz-box-shadow: 0px 2px 8px 2px rgba(0,0,0,0.4);
box-shadow: 0px 2px 8px 2px rgba(0,0,0,0.4);
}