Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- adventureForm = document.querySelector('#adventure');
- charterDrop = document.querySelector('.charter-options');
- mountainDrop = document.querySelector('.mountain-lake-options');
- trampDrop = document.querySelector('.tramp-options');
- photoDrop = document.querySelector('.photo-options');
- dropDowns = document.querySelector('#dropdowns');
- // check adventure dropdown choice
- if (field.id === "adventure" && adventureForm.selectedIndex === 0) {
- dropDowns.classList.add('hidden');
- } else if (field.id === "adventure" && adventureForm.selectedIndex === 1) {
- dropDowns.classList.remove('hidden');
- charterDrop.classList.remove('hidden');
- mountainDrop.classList.add('hidden');
- trampDrop.classList.add('hidden');
- photoDrop.classList.add('hidden');
- } else if (field.id === "adventure" && adventureForm.selectedIndex === 2) {
- dropDowns.classList.remove('hidden');
- charterDrop.classList.add('hidden');
- mountainDrop.classList.remove('hidden');
- trampDrop.classList.add('hidden');
- photoDrop.classList.add('hidden');
- } else if (field.id === "adventure" && adventureForm.selectedIndex === 3) {
- dropDowns.classList.remove('hidden');
- charterDrop.classList.add('hidden');
- mountainDrop.classList.add('hidden');
- trampDrop.classList.remove('hidden');
- photoDrop.classList.add('hidden');
- } else
- if (field.id === "adventure" && adventureForm.selectedIndex === 4) {
- dropDowns.classList.remove('hidden');
- charterDrop.classList.add('hidden');
- mountainDrop.classList.add('hidden');
- trampDrop.classList.add('hidden');
- photoDrop.classList.remove('hidden');
- }
Add Comment
Please, Sign In to add comment