Schools announce closures Tuesday ahead of expected snow

Schools announce closures Tuesday ahead of expected snow


LIST: Schools announce closures Tuesday ahead of expected snow

WITH NO QUESTIONS ASKED. WE ARE TOLD THAT BABY IS DOING WELL. ALL RIGHT. TURNING TO OUR WEATHER NOW, CHIEF METEOROLOGIST KEVIN ROBINSON IS HERE AND WE ARE ON THE EVE OF WHAT WILL BE ANOTHER ROUND OF SNOW TOMORROW. AND IT’S GOING TO BE STARTING PRETTY EARLY, MAYBE AS PEOPLE ARE JUST GETTING OUT OF THE HOUSE. YEAH, THE MORNING COMMUTE TOMORROW LIKELY TO BE IMPACTED TO SOME EXTENT BY FALLING SNOW IN THE MORNING. SO HERE’S A LOOK AT THE SYSTEM TONIGHT. THE STEADIEST OF THE SNOW WILL BE IN THE MID MORNING INTO THE EARLY AFTERNOON. WE DO ANTICIPATE SNOW COVERED ROADS AROUND HERE 1 TO 3IN FOR MOST OF US. BUT THERE WILL BE A CORRIDOR THAT SEES SLIGHTLY HEAVIER AMOUNTS THAT WE CONTINUE TO TRY TO KIND OF REALLY NARROW IN ON. SO OVERALL, THE TUESDAY SNOW TIMELINE SNOW ARRIVES AROUND SUNRISE. YOU KNOW, THAT’S A LITTLE BIT OF A WINDOW THERE. SO IF YOU START YOUR COMMUTE EARLIER YOU START THE LESS LIKELY YOU ARE TO BE IMPACTED BY SNOW. BUT THE LATER IN THE COMMUTE YOU WAIT, THE MORE LIKELY YOU ARE TO BE IMPACTED. BUT BY MID-MORNING, I THINK MOST OF US HAVE SNOW THROUGH THE EARLY AFTERNOON BEFORE IT BEGINS TO TAPER OFF DURING THE EVENING. SO AGAIN, GENERALLY 1 TO 3IN OF SNOW FOR MOST OF US. BUT THERE DOES APPEAR TO BE A CORRIDOR SOMEWHERE AROUND THE METRO AND THEN DOWN ALONG THE OHIO RIVER. AS WE HEAD EAST OF CINCINNATI, SOMEONE IS LIKELY TO PICK UP 3 TO 5IN OF SNOW IN AN AREA THAT WILL LIKELY SEE HEAVIER AMOUNTS. IT’S NOT A BROAD AREA, BUT CERTAINLY THE POTENTIAL IS THERE. SO LET ME SHOW YOU HOW THINGS LOOK ON FUTURECAST TAKE YOU INTO THE MORNING. THIS IS 6 A.M. IT’S STILL RELATIVELY QUIET. WATCH HOW QUICKLY THE SNOW BUILDS IN. THERE’S A LOOK AT SEVEN, TAKE YOU TOWARDS EIGHT AND NINE, AND ALREADY BY THIS POINT SHOULD BE SNOWING AT A GOOD CLIP ACROSS A GOOD PART OF THE METRO. AND I ALREADY THINK BY 9:00 OR SO WE COULD ALREADY BEGIN TO SEE ROADS BECOMING SNOW COVERED ACROSS THE AREA. YOU SEE HOW THE SNOW EXPANDS THROUGH LUNCHTIME AND THEN LIKELY CONTINUES AT A PRETTY DECENT CLIP THROUGH THE EARLY AFTERNOON, PARTICULARLY WHERE YOU SEE SOME OF THESE REALLY DARK BLUES. THAT’S GOING TO BE SOME PRETTY HEAVY SNOW THERE THROUGH THE AFTERNOON HOURS. SO AGAIN, TAPERING OFF SOMETIME AFTER 3 OR 4:00 TOMORROW AFTERNOON. RADAR, TONIGHT IS PRETTY QUIET TEMPERATURE WISE OUT THERE. IT’S A COLD ONE, RIGHT? MOST OF US ARE HOVERING IN THE UPPER 20S TO RIGHT AROUND 30 TONIGHT. SO OFFICIALLY HERE IN CINCINNATI, WE’VE GOT A LITTLE BIT OF A LIGHT WIND. WIND CHILL TONIGHT. 25. THIS IS THE WARMEST IT’S BEEN IN A WEEK FOR US THE NEXT 12 HOURS. TAKING YOU DOWN INTO THE 20S TONIGHT. AND THEN YOU CAN SEE THE SNOW BEGINNING TO COME IN TOWARDS DAYBREAK. SO QUIET AND COLD TONIGHT. 24 FOR YOUR OVERNIGHT LOW. AND THEN FOR TOMORROW WE’RE BACK UP TO ABOUT 2930 FOR A HIGH SNOW. OCCASIONALLY HEAVY AT TIMES, ENDING BEFORE THE EVENING. HERE’S A LOOK AT YOUR PLANNER AGAIN. MOST IMPACTFUL MID MORNING THROUGH EARLY AFTERNOON OR MID AFTERNOON AT LEAST. AND THEN IT TAPERS OFF. HERE’S YOUR SEVEN DAY FORECAST. BEHIND THE SNOW CHRIS COMES A FRESH BATCH OF COLD AIR TO TAKE US THROUGH THE END OF THE WEEK. MAYBE ABOVE FREEZING BRIEFLY THERE ON FRIDAY, ONLY TO SEE THOSE TEMPERATURES LIKELY COME BACK DOWN OV

LIST: Schools announce closures Tuesday ahead of expected snow

Updated: 11:09 PM EST Feb 2, 2026

Editorial Standards

Some districts around Greater Cincinnati are getting ahead of expected snow on Tuesday by canceling classes for students.SEE CLOSURES LIST HERE // SEE LATEST FORECASTA Winter Weather Advisory has been issued for portions of southeast Indiana, northeast and northern Kentucky, and central, south central and southwest Ohio.Snow develops on top of the region Tuesday. It starts light around 7 a.m. but picks up in intensity through the morning. The heaviest snow starts mid-morning and lasts into the afternoon. Snow covered roads will be possible.Totals will generally be around 1-3″ -but- there will be the potential for some to see 3-5″ where heavy snow bands set up. After the snow, temperatures crash to the lower teens again.

Some districts around Greater Cincinnati are getting ahead of expected snow on Tuesday by canceling classes for students.

SEE CLOSURES LIST HERE // SEE LATEST FORECAST

A Winter Weather Advisory has been issued for portions of southeast Indiana, northeast and northern Kentucky, and central, south central and southwest Ohio.

Snow develops on top of the region Tuesday. It starts light around 7 a.m. but picks up in intensity through the morning. The heaviest snow starts mid-morning and lasts into the afternoon. Snow covered roads will be possible.

Totals will generally be around 1-3″ -but- there will be the potential for some to see 3-5″ where heavy snow bands set up.

After the snow, temperatures crash to the lower teens again.

`;
}

function refreshWeatherIframe(containerId) {
var iframeId = ‘weather-iframe-‘ + containerId;
var iframe = document.getElementById(iframeId);
if (iframe && iframe.src) {
var originalSrc = iframe.src;
iframe.src = originalSrc + (originalSrc.indexOf(‘?’) > -1 ? ‘&’ : ‘?’) + ‘t=” + Date.now();
}
}

function initializeWeatherBox(container) {
var containerId = container.getAttribute(“data-container-id’);
var isWeatherBoxV2 = containerId === ‘home-weather-v2’;

function switchWeatherTab(tabName, clickedElement) {
container.querySelectorAll(‘[data-tab-id]’).forEach(function(tab) {
tab.classList.remove(‘open’);
tab.setAttribute(‘aria-selected’, ‘false’);
});

clickedElement.classList.add(‘open’);
clickedElement.setAttribute(‘aria-selected’, ‘true’);

container.querySelectorAll(‘[data-content-id]’).forEach(function(content) {
content.style.display = ‘none’;
content.setAttribute(‘hidden’, ‘true’);
});

var targetContent = container.querySelector(‘[data-content-id=”‘ + tabName + ‘”]’);
if (targetContent) {
targetContent.style.display = ‘block’;
targetContent.removeAttribute(‘hidden’);
}
}

function loadWeatherData() {
// If weather data is already being loaded, wait for it
if (window.weatherDataPromise) {
window.weatherDataPromise.then(function(data) {
if (data && data.data) {
var weatherContainer = container.closest(‘.weather-box-container’);
if (weatherContainer) {
weatherContainer.style.display = ‘flex’;
updateCurrentWeather(data.data);
updateForecastTabs(data.data);
updateWeatherAlertsBar(data.data);
}
}
});
return;
}

var location = { zip: window.DEFAULT_ZIPCODE };

try {
var storedLocations = localStorage.getItem(‘hrst.zip.history’);
if (storedLocations) {
var locations = JSON.parse(storedLocations);
if (locations && locations.length > 0) {
location = locations[0];
}
}
} catch (e) {}

var apiUrl = (window.DEWY_HOSTNAME || ”) + ‘/api/v1/weather/full/’ + location.zip;

if (window.fetch) {
window.weatherDataPromise = fetch(apiUrl)
.then(function(response) { return response.json(); })
.then(function(data) {
if (data && data.data) {
var article = container.closest(‘.article–wrapper’);
var weatherContainer = container.closest(‘.weather-box-container’);
if (weatherContainer) {
weatherContainer.style.display = ‘flex’;
updateCurrentWeather(data.data);
updateForecastTabs(data.data);
updateWeatherAlertsBar(data.data);
}
return data;
}
})
.catch(function(error) {
console.error(‘Error loading weather:’, error);
// Reset to unknown background on error
updateWeatherBackground(‘unknown’);
});
}
}

function updateWeatherAlertsBar(weatherData) {
var weatherWatchHeader = container.querySelector(‘.weather-watch-header’);
if (weatherWatchHeader && weatherData.alerts_count > 0) {
weatherWatchHeader.className=”weather-watch-header has-alerts”;
var weatherWatchText = weatherWatchHeader.querySelector(‘.weather-watch-text’);
var weatherWatchLink = weatherWatchHeader.querySelector(‘.weather-watch-link’);
if (weatherWatchText) {
weatherWatchText.textContent = `Weather Alerts (${weatherData.alerts_count})`;
}
if (weatherWatchLink) {
weatherWatchLink.setAttribute(‘onclick’, “return handleWeatherLinkClick(event, ‘click_alerts’, ‘click’, ‘mobile-weather’, “https://www.wlwt.com/alerts”);”);
}
}
}

function updateCurrentWeather(weatherData) {
if (weatherData.current) {
var tempValue = weatherData.current.temp_f || ”;
var skyValue = weatherData.current.sky || ”;
var feelsLikeValue = weatherData.current.feels_like_f || weatherData.current.temp_f || ”;

var tempEl = container.querySelector(‘.weather-grid–current-temp-value’);
if (tempEl) {
tempEl.textContent = tempValue;
tempEl.setAttribute(‘aria-label’, tempValue + ‘ degrees Fahrenheit’);
}

var iconEl = container.querySelector(‘.weather-grid–current-icon’);
if (iconEl && weatherData.current.icon_name) {
iconEl.className=”weather-grid–current-icon weather-current-icon icon icon-weather-” + weatherData.current.icon_name;
}

var skyEl = container.querySelector(‘.weather-grid–sky’);
if (skyEl) {
skyEl.textContent = skyValue;
skyEl.setAttribute(‘aria-label’, ‘Current condition: ‘ + skyValue);
}

var feelsEl = container.querySelector(‘.weather-grid–feels’);
if (feelsEl) {
feelsEl.textContent = feelsLikeValue + ‘°F’;
feelsEl.setAttribute(‘aria-label’, feelsLikeValue + ‘ degrees Fahrenheit’);
}

var weatherContainer = container.querySelector(‘.weather-temp-container’);
if (weatherContainer) {
var summary = ‘Current temperature ‘ + tempValue + ‘ degrees Fahrenheit, ‘ +
skyValue + ‘, feels like ‘ + feelsLikeValue + ‘ degrees’;
weatherContainer.setAttribute(‘aria-label’, summary);
}

updateWeatherBackground(weatherData.current.icon_name);
}
}

function updateWeatherBackground(iconName) {
try {
var bgPath = weatherImages.backgrounds[iconName] || weatherImages.backgrounds.unknown;
container.style.backgroundImage=”url(” + bgPath + ‘)’;
} catch (e) {
console.log(‘Error updating weather background:’, e);
}
}

function updateForecastTabs(weatherData) {
var visibleItems = isWeatherBoxV2 ? 6 : 5;

if (weatherData.hourly) {
var hourlyContainer = container.querySelector(‘.weather-hourly-forecast’);
if (hourlyContainer) {
var html=””;
var maxHours = Math.min(visibleItems, weatherData.hourly.length);

for (var i = 0; i < maxHours; i++) {
var hour = weatherData.hourly[i];
html += generateForecastItem({
timeLabel: hour.hour_display,
iconName: hour.icon_name,
primaryTemp: hour.temp_f,
secondaryInfo: hour.precip_chance + ‘%’
});
}
hourlyContainer.innerHTML = html;
}
}

if (weatherData.daily) {
var dailyContainer = container.querySelector(‘.weather-daily-forecast’);
if (dailyContainer) {
var html=””;
var maxDays = Math.min(visibleItems, weatherData.daily.length);

for (var i = 0; i < maxDays; i++) {
var day = weatherData.daily[i];
var dayName = getShortDayName(day.day);

html += generateForecastItem({
timeLabel: dayName,
iconName: day.icon_name,
primaryTemp: day.high_f,
secondaryInfo: day.precip_chance + ‘%’
});
}
dailyContainer.innerHTML = html;
}
}
}

function getShortDayName(dayName) {
switch (dayName) {
case ‘Today’:
return ‘Today’;
case ‘Tomorrow’:
return ‘Tmrw’;
case ‘Sunday’:
return ‘Sun’;
case ‘Monday’:
return ‘Mon’;
case ‘Tuesday’:
return ‘Tue’;
case ‘Wednesday’:
return ‘Wed’;
case ‘Thursday’:
return ‘Thu’;
case ‘Friday’:
return ‘Fri’;
case ‘Saturday’:
return ‘Sat’;
default:
return dayName;
}
}

container.querySelectorAll(‘[data-tab-id]’).forEach(function(tab) {
var isActive = tab.classList.contains(‘open’);
tab.setAttribute(‘tabindex’, ‘0’); // Both tabs focusable for VoiceOver
tab.setAttribute(‘role’, ‘tab’);
tab.setAttribute(‘aria-selected’, isActive);

tab.addEventListener(‘keydown’, function(e) {
var tabs = Array.from(container.querySelectorAll(‘[data-tab-id]’));
var currentIndex = tabs.indexOf(this);

switch(e.key) {
case ‘ArrowLeft’:
e.preventDefault();
var prevIndex = currentIndex > 0 ? currentIndex – 1 : tabs.length – 1;
tabs[prevIndex].focus();
break;
case ‘ArrowRight’:
e.preventDefault();
var nextIndex = currentIndex < tabs.length – 1 ? currentIndex + 1 : 0;
tabs[nextIndex].focus();
break;
case ‘Enter’:
case ‘ ‘:
e.preventDefault();
var tabId = this.getAttribute(‘data-tab-id’);
switchWeatherTab(tabId, this);
if (tabId === ‘hourly’) {
dispatchWeatherGA4Event(‘click_hourly’, ‘click’, containerId);
} else if (tabId === ‘daily’) {
dispatchWeatherGA4Event(‘click_daily’, ‘click’, containerId);
}
break;
}
});

tab.onclick = function() {
var tabId = this.getAttribute(‘data-tab-id’);
switchWeatherTab(tabId, this);
if (tabId === ‘hourly’) {
dispatchWeatherGA4Event(‘click_hourly’, ‘click’, containerId);
} else if (tabId === ‘daily’) {
dispatchWeatherGA4Event(‘click_daily’, ‘click’, containerId);
}
return false;
};
});

loadWeatherData();

window.addEventListener(‘pageshow’, function(event) {
if (event.persisted) {
// Fix for weather radar iframe appearing gray after browser back/forward navigation
// When user navigates back, the page loads from browser cache but the iframe
// content doesn’t restore properly, showing a gray screen instead of the radar map
// This forces a fresh reload of the iframe by adding a timestamp parameter
setTimeout(function() {
refreshWeatherIframe(containerId);
}, 300);
}
});
}

document.querySelectorAll(‘.weather-sidebar’).forEach(function(weatherBox) {
initializeWeatherBox(weatherBox);
});

document.addEventListener(‘fullscreenchange’, function() {
var fullscreenElement = document.fullscreenElement;
if (!fullscreenElement) {
document.querySelector(‘.weather-box-container’).querySelectorAll(‘.fa-times’).forEach(function(icon) {
icon.classList.remove(‘fa-times’);
icon.classList.add(‘fa-expand’);
});
}
});
});

`;
}

function refreshWeatherIframe(containerId) {
var iframeId = ‘weather-iframe-‘ + containerId;
var iframe = document.getElementById(iframeId);
if (iframe && iframe.src) {
var originalSrc = iframe.src;
iframe.src = originalSrc + (originalSrc.indexOf(‘?’) > -1 ? ‘&’ : ‘?’) + ‘t=” + Date.now();
}
}

function initializeWeatherBox(container) {
var containerId = container.getAttribute(“data-container-id’);
var isWeatherBoxV2 = containerId === ‘home-weather-v2’;

function switchWeatherTab(tabName, clickedElement) {
container.querySelectorAll(‘[data-tab-id]’).forEach(function(tab) {
tab.classList.remove(‘open’);
tab.setAttribute(‘aria-selected’, ‘false’);
});

clickedElement.classList.add(‘open’);
clickedElement.setAttribute(‘aria-selected’, ‘true’);

container.querySelectorAll(‘[data-content-id]’).forEach(function(content) {
content.style.display = ‘none’;
content.setAttribute(‘hidden’, ‘true’);
});

var targetContent = container.querySelector(‘[data-content-id=”‘ + tabName + ‘”]’);
if (targetContent) {
targetContent.style.display = ‘block’;
targetContent.removeAttribute(‘hidden’);
}
}

function loadWeatherData() {
// If weather data is already being loaded, wait for it
if (window.weatherDataPromise) {
window.weatherDataPromise.then(function(data) {
if (data && data.data) {
var weatherContainer = container.closest(‘.weather-box-container’);
if (weatherContainer) {
weatherContainer.style.display = ‘flex’;
updateCurrentWeather(data.data);
updateForecastTabs(data.data);
updateWeatherAlertsBar(data.data);
}
}
});
return;
}

var location = { zip: window.DEFAULT_ZIPCODE };

try {
var storedLocations = localStorage.getItem(‘hrst.zip.history’);
if (storedLocations) {
var locations = JSON.parse(storedLocations);
if (locations && locations.length > 0) {
location = locations[0];
}
}
} catch (e) {}

var apiUrl = (window.DEWY_HOSTNAME || ”) + ‘/api/v1/weather/full/’ + location.zip;

if (window.fetch) {
window.weatherDataPromise = fetch(apiUrl)
.then(function(response) { return response.json(); })
.then(function(data) {
if (data && data.data) {
var article = container.closest(‘.article–wrapper’);
var weatherContainer = container.closest(‘.weather-box-container’);
if (weatherContainer) {
weatherContainer.style.display = ‘flex’;
updateCurrentWeather(data.data);
updateForecastTabs(data.data);
updateWeatherAlertsBar(data.data);
}
return data;
}
})
.catch(function(error) {
console.error(‘Error loading weather:’, error);
// Reset to unknown background on error
updateWeatherBackground(‘unknown’);
});
}
}

function updateWeatherAlertsBar(weatherData) {
var weatherWatchHeader = container.querySelector(‘.weather-watch-header’);
if (weatherWatchHeader && weatherData.alerts_count > 0) {
weatherWatchHeader.className=”weather-watch-header has-alerts”;
var weatherWatchText = weatherWatchHeader.querySelector(‘.weather-watch-text’);
var weatherWatchLink = weatherWatchHeader.querySelector(‘.weather-watch-link’);
if (weatherWatchText) {
weatherWatchText.textContent = `Weather Alerts (${weatherData.alerts_count})`;
}
if (weatherWatchLink) {
weatherWatchLink.setAttribute(‘onclick’, “return handleWeatherLinkClick(event, ‘click_alerts’, ‘click’, ‘sidelist-weather’, “https://www.wlwt.com/alerts”);”);
}
}
}

function updateCurrentWeather(weatherData) {
if (weatherData.current) {
var tempValue = weatherData.current.temp_f || ”;
var skyValue = weatherData.current.sky || ”;
var feelsLikeValue = weatherData.current.feels_like_f || weatherData.current.temp_f || ”;

var tempEl = container.querySelector(‘.weather-grid–current-temp-value’);
if (tempEl) {
tempEl.textContent = tempValue;
tempEl.setAttribute(‘aria-label’, tempValue + ‘ degrees Fahrenheit’);
}

var iconEl = container.querySelector(‘.weather-grid–current-icon’);
if (iconEl && weatherData.current.icon_name) {
iconEl.className=”weather-grid–current-icon weather-current-icon icon icon-weather-” + weatherData.current.icon_name;
}

var skyEl = container.querySelector(‘.weather-grid–sky’);
if (skyEl) {
skyEl.textContent = skyValue;
skyEl.setAttribute(‘aria-label’, ‘Current condition: ‘ + skyValue);
}

var feelsEl = container.querySelector(‘.weather-grid–feels’);
if (feelsEl) {
feelsEl.textContent = feelsLikeValue + ‘°F’;
feelsEl.setAttribute(‘aria-label’, feelsLikeValue + ‘ degrees Fahrenheit’);
}

var weatherContainer = container.querySelector(‘.weather-temp-container’);
if (weatherContainer) {
var summary = ‘Current temperature ‘ + tempValue + ‘ degrees Fahrenheit, ‘ +
skyValue + ‘, feels like ‘ + feelsLikeValue + ‘ degrees’;
weatherContainer.setAttribute(‘aria-label’, summary);
}

updateWeatherBackground(weatherData.current.icon_name);
}
}

function updateWeatherBackground(iconName) {
try {
var bgPath = weatherImages.backgrounds[iconName] || weatherImages.backgrounds.unknown;
container.style.backgroundImage=”url(” + bgPath + ‘)’;
} catch (e) {
console.log(‘Error updating weather background:’, e);
}
}

function updateForecastTabs(weatherData) {
var visibleItems = isWeatherBoxV2 ? 6 : 5;

if (weatherData.hourly) {
var hourlyContainer = container.querySelector(‘.weather-hourly-forecast’);
if (hourlyContainer) {
var html=””;
var maxHours = Math.min(visibleItems, weatherData.hourly.length);

for (var i = 0; i < maxHours; i++) {
var hour = weatherData.hourly[i];
html += generateForecastItem({
timeLabel: hour.hour_display,
iconName: hour.icon_name,
primaryTemp: hour.temp_f,
secondaryInfo: hour.precip_chance + ‘%’
});
}
hourlyContainer.innerHTML = html;
}
}

if (weatherData.daily) {
var dailyContainer = container.querySelector(‘.weather-daily-forecast’);
if (dailyContainer) {
var html=””;
var maxDays = Math.min(visibleItems, weatherData.daily.length);

for (var i = 0; i < maxDays; i++) {
var day = weatherData.daily[i];
var dayName = getShortDayName(day.day);

html += generateForecastItem({
timeLabel: dayName,
iconName: day.icon_name,
primaryTemp: day.high_f,
secondaryInfo: day.precip_chance + ‘%’
});
}
dailyContainer.innerHTML = html;
}
}
}

function getShortDayName(dayName) {
switch (dayName) {
case ‘Today’:
return ‘Today’;
case ‘Tomorrow’:
return ‘Tmrw’;
case ‘Sunday’:
return ‘Sun’;
case ‘Monday’:
return ‘Mon’;
case ‘Tuesday’:
return ‘Tue’;
case ‘Wednesday’:
return ‘Wed’;
case ‘Thursday’:
return ‘Thu’;
case ‘Friday’:
return ‘Fri’;
case ‘Saturday’:
return ‘Sat’;
default:
return dayName;
}
}

container.querySelectorAll(‘[data-tab-id]’).forEach(function(tab) {
var isActive = tab.classList.contains(‘open’);
tab.setAttribute(‘tabindex’, ‘0’); // Both tabs focusable for VoiceOver
tab.setAttribute(‘role’, ‘tab’);
tab.setAttribute(‘aria-selected’, isActive);

tab.addEventListener(‘keydown’, function(e) {
var tabs = Array.from(container.querySelectorAll(‘[data-tab-id]’));
var currentIndex = tabs.indexOf(this);

switch(e.key) {
case ‘ArrowLeft’:
e.preventDefault();
var prevIndex = currentIndex > 0 ? currentIndex – 1 : tabs.length – 1;
tabs[prevIndex].focus();
break;
case ‘ArrowRight’:
e.preventDefault();
var nextIndex = currentIndex < tabs.length – 1 ? currentIndex + 1 : 0;
tabs[nextIndex].focus();
break;
case ‘Enter’:
case ‘ ‘:
e.preventDefault();
var tabId = this.getAttribute(‘data-tab-id’);
switchWeatherTab(tabId, this);
if (tabId === ‘hourly’) {
dispatchWeatherGA4Event(‘click_hourly’, ‘click’, containerId);
} else if (tabId === ‘daily’) {
dispatchWeatherGA4Event(‘click_daily’, ‘click’, containerId);
}
break;
}
});

tab.onclick = function() {
var tabId = this.getAttribute(‘data-tab-id’);
switchWeatherTab(tabId, this);
if (tabId === ‘hourly’) {
dispatchWeatherGA4Event(‘click_hourly’, ‘click’, containerId);
} else if (tabId === ‘daily’) {
dispatchWeatherGA4Event(‘click_daily’, ‘click’, containerId);
}
return false;
};
});

loadWeatherData();

window.addEventListener(‘pageshow’, function(event) {
if (event.persisted) {
// Fix for weather radar iframe appearing gray after browser back/forward navigation
// When user navigates back, the page loads from browser cache but the iframe
// content doesn’t restore properly, showing a gray screen instead of the radar map
// This forces a fresh reload of the iframe by adding a timestamp parameter
setTimeout(function() {
refreshWeatherIframe(containerId);
}, 300);
}
});
}

document.querySelectorAll(‘.weather-sidebar’).forEach(function(weatherBox) {
initializeWeatherBox(weatherBox);
});

document.addEventListener(‘fullscreenchange’, function() {
var fullscreenElement = document.fullscreenElement;
if (!fullscreenElement) {
document.querySelector(‘.weather-box-container’).querySelectorAll(‘.fa-times’).forEach(function(icon) {
icon.classList.remove(‘fa-times’);
icon.classList.add(‘fa-expand’);
});
}
});
});

Loading more articles…

Leave a Reply

Your email address will not be published. Required fields are marked *