Guest User

Untitled

a guest
Sep 30th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. adventureForm = document.querySelector('#adventure');
  2. charterDrop = document.querySelector('.charter-options');
  3. mountainDrop = document.querySelector('.mountain-lake-options');
  4. trampDrop = document.querySelector('.tramp-options');
  5. photoDrop = document.querySelector('.photo-options');
  6. dropDowns = document.querySelector('#dropdowns');
  7.  
  8. // check adventure dropdown choice
  9. if (field.id === "adventure" && adventureForm.selectedIndex === 0) {
  10. dropDowns.classList.add('hidden');
  11.  
  12. } else if (field.id === "adventure" && adventureForm.selectedIndex === 1) {
  13. dropDowns.classList.remove('hidden');
  14. charterDrop.classList.remove('hidden');
  15. mountainDrop.classList.add('hidden');
  16. trampDrop.classList.add('hidden');
  17. photoDrop.classList.add('hidden');
  18. } else if (field.id === "adventure" && adventureForm.selectedIndex === 2) {
  19. dropDowns.classList.remove('hidden');
  20. charterDrop.classList.add('hidden');
  21. mountainDrop.classList.remove('hidden');
  22. trampDrop.classList.add('hidden');
  23. photoDrop.classList.add('hidden');
  24. } else if (field.id === "adventure" && adventureForm.selectedIndex === 3) {
  25. dropDowns.classList.remove('hidden');
  26. charterDrop.classList.add('hidden');
  27. mountainDrop.classList.add('hidden');
  28. trampDrop.classList.remove('hidden');
  29. photoDrop.classList.add('hidden');
  30. } else
  31. if (field.id === "adventure" && adventureForm.selectedIndex === 4) {
  32. dropDowns.classList.remove('hidden');
  33. charterDrop.classList.add('hidden');
  34. mountainDrop.classList.add('hidden');
  35. trampDrop.classList.add('hidden');
  36. photoDrop.classList.remove('hidden');
  37. }
Add Comment
Please, Sign In to add comment