I’m using Webflow for a radio station website, and I’m looking for a way to use a tab element to have the programs on-air for each day of the week.
Each tab will be a day (Monday, Tuesday etc.) and inside the tab will be a clickable list of programs, who the presenter is etc.
I was wondering - Is there a way, maybe with custom code, to automatically switch to the tab depending on the day it is?
For example:
On Tuesdays, a listener visits the website, scrolls down to the programs section, and see’s the “Tuesday” tab in the tab element already selected, and displaying the programs for a Tuesday.
<script>
function showhide() {
var d = new Date();
var s = document.getElementById(+d.getDay());
s.style.display = (s.style.display == 'block') ? 'none' : 'block';
}
showhide();
</script>