text: // today's date formated using moment.js
  let today = moment().format("dddd[,] MMMM Do");
  $("#currentDay").text(today);
  
  // used moment.js to retrieve local time based on 24 hour format)
  let currentHour = moment().format("H");
  
  // added variable to store text within text area
  let workHours = document.querySelectorAll(".eventTxt");
  
  // added variable to store save button
  const saveBtnEl = document.querySelectorAll(".saveBtn");
  
  // added for loop to save text in 9am timeblock into local storage
  for (var i = 0; i < saveBtnEl.length; i++) {
    saveBtnEl[i].addEventListener("click", function (event) {
      event.preventDefault();
      let eventTxtEl = document.getElementById("9").value;
      localStorage.setItem("9", JSON.stringify(eventTxtEl));
      console.log(eventTxtEl);
      let data = JSON.parse(localStorage.getItem("9"));
      console.log(data);
    });
  }
  // added for loop to save text in 10am timeblock into local storage
  for (var i = 0; i < saveBtnEl.length; i++) {
    saveBtnEl[i].addEventListener("click", function (event) {
      event.preventDefault();
      let eventTxtEl = document.getElementById("10").value;
      localStorage.setItem("10", JSON.stringify(eventTxtEl));
      console.log(eventTxtEl);
      let data = JSON.parse(localStorage.getItem("10"));
      console.log(data);
    });
  }
  // added for loop to save text in 11am timeblock into local storage
  for (var i = 0; i < saveBtnEl.length; i++) {
    saveBtnEl[i].addEventListener("click", function (event) {
      event.preventDefault();
      let eventTxtEl = document.getElementById("11").value;
      localStorage.setItem("11", JSON.stringify(eventTxtEl));
      console.log(eventTxtEl);
      let data = JSON.parse(localStorage.getItem("11"));
      console.log(data);
    });
  }
  // added for loop to save text in 12pm timeblock into local storage
  for (var i = 0; i < saveBtnEl.length; i++) {
    saveBtnEl[i].addEventListener("click", function (event) {
      event.preventDefault();
      let eventTxtEl = document.getElementById("12").value;
      localStorage.setItem("12", JSON.stringify(eventTxtEl));
      console.log(eventTxtEl);
      let data = JSON.parse(localStorage.getItem("12"));
      console.log(data);
    });
  }
  // added for loop to save text in 1pm timeblock into local storage
  for (var i = 0; i < saveBtnEl.length; i++) {
    saveBtnEl[i].addEventListener("click", function (event) {
      event.preventDefault();
      let eventTxtEl = document.getElementById("13").value;
      localStorage.setItem("13", JSON.stringify(eventTxtEl));
      console.log(eventTxtEl);
      let data = JSON.parse(localStorage.getItem("13"));
      console.log(data);
    });
  }
  // added for loop to save text in 2pm timeblock into local storage
  for (var i = 0; i < saveBtnEl.length; i++) {
    saveBtnEl[i].addEventListener("click", function (event) {
      event.preventDefault();
      let eventTxtEl = document.getElementById("14").value;
      localStorage.setItem("14", JSON.stringify(eventTxtEl));
      console.log(eventTxtEl);
      let data = JSON.parse(localStorage.getItem("14"));
      console.log(data);
    });
  }
  // added for loop to save text in 3pm timeblock into local storage
  for (var i = 0; i < saveBtnEl.length; i++) {
    saveBtnEl[i].addEventListener("click", function (event) {
      event.preventDefault();
      let eventTxtEl = document.getElementById("15").value;
      localStorage.setItem("15", JSON.stringify(eventTxtEl));
      console.log(eventTxtEl);
      let data = JSON.parse(localStorage.getItem("15"));
      console.log(data);
    });
  }
  // added for loop to save text in 4pm timeblock into local storage
  for (var i = 0; i < saveBtnEl.length; i++) {
    saveBtnEl[i].addEventListener("click", function (event) {
      event.preventDefault();
      let eventTxtEl = document.getElementById("16").value;
      localStorage.setItem("16", JSON.stringify(eventTxtEl));
      console.log(eventTxtEl);
      let data = JSON.parse(localStorage.getItem("16"));
      console.log(data);
    });
  }
  // added for loop to save text in 5pm timeblock into local storage
  for (var i = 0; i < saveBtnEl.length; i++) {
    saveBtnEl[i].addEventListener("click", function (event) {
      event.preventDefault();
      let eventTxtEl = document.getElementById("17").value;
      localStorage.setItem("17", JSON.stringify(eventTxtEl));
      console.log(eventTxtEl);
      let data = JSON.parse(localStorage.getItem("17"));
      console.log(data);
    });
  }
  
  // added regex to replace text in textarea with text saved in local storage for that time block
  $("#9").val(localStorage.getItem("9").replace(/[""]+/g, ""));
  $("#10").val(localStorage.getItem("10").replace(/[""]+/g, ""));
  $("#11").val(localStorage.getItem("11").replace(/[""]+/g, ""));
  $("#12").val(localStorage.getItem("12").replace(/[""]+/g, ""));
  $("#13").val(localStorage.getItem("13").replace(/[""]+/g, ""));
  $("#14").val(localStorage.getItem("14").replace(/[""]+/g, ""));
  $("#15").val(localStorage.getItem("15").replace(/[""]+/g, ""));
  $("#16").val(localStorage.getItem("16").replace(/[""]+/g, ""));
  $("#17").val(localStorage.getItem("17").replace(/[""]+/g, ""));
  
  // Colors of time selections
  for (var i = 0; i < workHours.length; i++) {
    var storeId = parseInt(workHours[i].getAttribute("id"));
    if (storeId < currentHour) {
      workHours[i].setAttribute("class", "past");
    } else if (storeId == currentHour) {
      workHours[i].setAttribute("class", "present");
    } else {
      workHours[i].setAttribute("class", "future");
    }
  }
  