Miscellany
public text v1 · immutablefunction toggle(id,switch='on') {
// Get the element
e = document.getElementById(id);
// Determine on/off
if (switch=='on') {
c = '#eee';
} else {
c = 'none';
}
// If element exists, change the style accordingly
if (e) {
e.style.background = c;
}
return;
}
///// then call it this way
<ul onmouseover="toggle('about'); onmouseout="toggle('about','off');">