My document looks like this:

Basically, the background is a full-screen, transparent div. There are a couple of problems ... if I just create a background div and don’t apply any z-index to it, it is on top of everything and I can’t click on the field. If I set the z-index of the background div to be below the field, I cannot click on the background. I want to do this in order to be able to click on the field and the background.
var x = document.getElementById("bg");
x.addEventListener("click",reset,false);
function reset() {
alert("reset was clicked");
}
COMPLETION: the field is at the same node level as in bg. it is not inside the bg div.
source
share