Updated double load
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
$(document).ready(function() {
|
||||
// Function to fetch the radar station alarms
|
||||
function fetchAlarms(stationId, elementId) {
|
||||
var apiUrl = "https://api.weather.gov/radar/stations/" + stationId + "/alarms";
|
||||
var apiUrl = "https://api.weather.gov/radar/stations/KMBX/alarms";
|
||||
var alarmsElement = $("#" + elementId);
|
||||
|
||||
$.getJSON(apiUrl, function(data) {
|
||||
@@ -77,10 +77,11 @@
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Call the fetchAlarms function initially and then every minute
|
||||
fetchAlarms("KBIS", "alarms-container");
|
||||
fetchAlarms("KMBX", "alarms-container");
|
||||
setInterval(function() {
|
||||
fetchAlarms("KBIS", "alarms-container");
|
||||
fetchAlarms("KMBX", "alarms-container");
|
||||
}, 60000); // 60000 milliseconds = 1 minute
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user