change property of element when a certain element is on screen html css code example Example: display none js document.getElementById("myDIV").style.display = "none";