-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
22 lines (20 loc) · 737 Bytes
/
script.js
File metadata and controls
22 lines (20 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// show and hide sections of a form
//A check box, that when I check it is activating or turning on another section of the form itself
function preparePage() {
document.getElementById("brochures").onclick = function() {
//"brochures": id of checkbox
if (document.getElementById("brochures").checked) {
// use CSS style to show it
document.getElementById("tourSelection").style.display = "block";
//"tourSelection": hiden sections
} else {
// hide the div
document.getElementById("tourSelection").style.display = "none";
}
};
// now hide it on the initial page load.
document.getElementById("tourSelection").style.display = "none";
}
window.onload = function() {
preparePage();
};