From 5c0e5bdc0b2c9df0b9c0ea281362afe6cab645b7 Mon Sep 17 00:00:00 2001 From: hoangsonw Date: Fri, 24 Nov 2023 21:55:02 -0500 Subject: [PATCH] fixed UI display --- .idea/vcs.xml | 6 ++++++ index.html | 2 +- script.js | 7 +++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .idea/vcs.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/index.html b/index.html index 923be1d..0bfb8c6 100644 --- a/index.html +++ b/index.html @@ -43,7 +43,7 @@

The WeatherMate App

-
A reminder that you must enter the exact name of your desired city/region to properly get its accurate weather information!
+
diff --git a/script.js b/script.js index 58cbf92..bfb2cce 100644 --- a/script.js +++ b/script.js @@ -291,9 +291,16 @@ form.addEventListener("submit", (e) => { if (city) { getWeatherByLocation(city); + const subhead = document.getElementById("subhead"); + subhead.style.display = 'none'; } }); +form.addEventListener("click", (e) => { + const subhead = document.getElementById("subhead"); + subhead.style.display = 'block'; +}); + buttonSearch.addEventListener("click", (e) => { e.preventDefault();