function updateColor() {
  var hour = new Date().getHours();
  for (var i = 9; i < 18; i++) {
    if (hour == i) {
      $(`#inputText${i}`).addClass("present")
    } else if (hour < i) {

      $(`#inputText${i}`).addClass("future")

    }else if(hour > i){
      $(`#inputText${i}`).addClass("past")

    }
  }

//when the button is clicked it saves the data
$(".btn").click(function(){
  var id = $(this).data("id")
  var input = $(this).parent().siblings().find("input").val()
localStorage.setItem(id,input)
})

}
//updates the color based on the time of day
updates the color based on the time of day
updates the color based on the time of day
function updateColor() {
  var hour = new Date().getHours();
  for (var i = 9; i < 18; i++) {
    if (hour == i) {
      $(`#inputText${i}`).addClass("present")
    } else if (hour < i) {
      $(`#inputText${i}`).addClass("future")
    }else if(hour > i){
      $(`#inputText${i}`).addClass("past")
    }
  }
$(".btn").click(function(){
  var id = $(this).data("id")
  var input = $(this).parent().siblings().find("input").val()
localStorage.setItem(id,input)
})
}
function updateColor ( ) { var hour = new Date ( ) . getHours ( ) ; for ( var i = 9 ; i < 18 ; i ++ ) { if ( hour == i ) { $ ( ` ${ i } ` ) . addClass ( "present" ) } else if ( hour < i ) { $ ( ` ${ i } ` ) . addClass ( "future" ) } else if ( hour > i ) { $ ( ` ${ i } ` ) . addClass ( "past" ) } } $ ( ".btn" ) . click ( function ( ) { var id = $ ( this ) . data ( "id" ) var input = $ ( this ) . parent ( ) . siblings ( ) . find ( "input" ) . val ( ) localStorage . setItem ( id , input ) } ) }
updates the color based on the time of day
updates the color based on the time of day
//when the button is clicked it saves the data