function newThing(e) { let type = e.currentTarget.value; let range = e.currentTarget.parentNode.parentNode.parentNode.nextElementSibling; // get the 4 (optional) inputs for scaled-type questions range.style.display = (type === "1") ? 'block' : 'none'; // "1" corresponds to scaled questions }