Skip to content

Commit

Permalink
update jquery link
Browse files Browse the repository at this point in the history
  • Loading branch information
ram-sah committed Sep 12, 2024
1 parent c46b6ef commit 2460204
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Assets/script.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
$(window).on("load", function () {
currentLocation();
checkLocalStorage();
startUpdatingTime()
startUpdatingTime();
});
// API Key for all weather data
var APIKey = "09e0d7e534e41ce68ba5f2577fa5f760";
var q = "";
var now = moment();
//Date and time formate for header
// var currentDate = now.format("MMMM Do YYYY || h:mm:ss a");
// $("#currentDay").text(currentDate);

function startUpdatingTime() {
// Use moment to get the current time and format it
Expand Down Expand Up @@ -37,6 +35,8 @@ $("#search-button").on("click", function (event) {
getWeather(q);
saveToLocalStorage(q);

$("#city-input").val(""); // Add this line to clear the input field

// Check if checkLocalStorage() has already been called
if (!hasCheckedLocalStorage) {
checkLocalStorage();
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<link rel="stylesheet" type="text/css" href="./Assets/styles.css">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0/css/bootstrap.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/moment.min.js"></script>

<script
src="https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.34/moment-timezone-with-data.min.js"></script>
Expand Down

0 comments on commit 2460204

Please sign in to comment.