Comment Comment by mustardo Not even particularly elegant code, for example, opacity is clamped between 0 and 1 in in the very next line a bounds check is made anyway. opacity = (opacity < 0) ? 0 : opacity; opacity = (opacity > 1) ? 1 : opacity; if(opacity >= 0 && opacity <= 1) { document.getElementsByTagName("BODY")[0].style.opacity = opacity; } parent mustardo 2 years ago