Skip to content

Commit

Permalink
fixed UI display
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangsonww committed Nov 25, 2023
1 parent 25fa962 commit 5c0e5bd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h1 id="my-heading">The WeatherMate App</h1>

<button type="button" id="btn">SEARCH OR PRESS ENTER</button>

<h5 id="subhead">A reminder that you must enter the exact name of your desired city/region to properly get its accurate weather information!</h5>
<h5 id="subhead" style="display: none;">A reminder that you must enter the exact name of your desired city/region to properly get its accurate weather information!</h5>

<div id="favorites-section">
<!-- Favorite cities will be appended here -->
Expand Down
7 changes: 7 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 5c0e5bd

Please sign in to comment.