diff --git a/index.html b/index.html index 25d73a2..fe1134b 100644 --- a/index.html +++ b/index.html @@ -46,7 +46,7 @@

Itinerary Preview

diff --git a/scripts/main.js b/scripts/main.js index 6cfa092..9131a6f 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -13,10 +13,9 @@ import { displayPark, showParkDetails } from "./parks/ParkPreview.js" import { itineraryList } from "./itinerary/ItineraryList.js"; import { createItinerary } from "./data/DataManager.js"; -import { displaySave } from "./nav/Footer.js"; - // Set Application For Event Bubbling const applicationElement = document.querySelector("body"); +document.getElementById("saveItinerary").disabled = true; // Event Listener To Test Capture of All Previewed Locations const saveItinerary = () => { @@ -39,8 +38,8 @@ const saveItinerary = () => { parkPreviewLocation: parkPreviewLocation }; createItinerary(itineraryObject); + location.reload(); } - }) } @@ -106,17 +105,6 @@ parkDetailElement.addEventListener("click", (event) => { } }) -/*~~~~~~~~~~~~~~~Test Code~~~~~~~~~~~~~~~ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ -// const contentElement = document.querySelector("body"); -// contentElement.addEventListener("click", event => { -// if (event.target.id === "") -// console.log(event.target.id) -// }) - - -/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ //? Drop Down Population // Display Save Button When Three Selections Are Made @@ -125,7 +113,7 @@ const saveCheck = () => { const attractionContainer = document.querySelector(".attractionCard"); const eateryContainer = document.querySelector(".eateryCard"); if (!(parkContainer.innerHTML === "" || attractionContainer.innerHTML === "" || eateryContainer.innerHTML === "")) { - displaySave(); + document.getElementById("saveItinerary").disabled = false; } } @@ -137,7 +125,6 @@ eateryDetailElement.addEventListener("click", (event) => { for (let anEatery of eateryListArray) { // Although value is a number, it is presented as a string in EateryPreview.js / parseInt converts it to an integer if (anEatery.id === parseInt(event.target.value)) { - showEateryDetails(anEatery) } } diff --git a/scripts/nav/Footer.js b/scripts/nav/Footer.js deleted file mode 100644 index 7bb8ff0..0000000 --- a/scripts/nav/Footer.js +++ /dev/null @@ -1,7 +0,0 @@ -export const displaySave = () => { - const navElement = document.querySelector("footer"); - - let saveButton = ``; - - navElement.innerHTML = saveButton; -} \ No newline at end of file diff --git a/scripts/parks/ParkPreview.js b/scripts/parks/ParkPreview.js index f35a072..e3c9efd 100644 --- a/scripts/parks/ParkPreview.js +++ b/scripts/parks/ParkPreview.js @@ -2,8 +2,8 @@ export const displayPark = (parkObj) => { const contentElement = document.querySelector(".parkCard") let parkDisplay = ` -

${parkObj.fullName}

-

${parkObj.addresses[0].city}, ${parkObj.states}


+

${parkObj.fullName}

+

${parkObj.addresses[0].city}, ${parkObj.states}


Visit the ${parkObj.fullName} official website!