Streaming live at 10am (PST)

How to display certain tab depending on certain day of the week?

Hey guys!

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.

Is this possible?

Thanks in advanced :grinning:

Hello @KaiLovel

I’ve found this:

    <script>
      function showhide() {
        var d = new Date();
        var s = document.getElementById(+d.getDay());
        s.style.display = (s.style.display == 'block') ? 'none' : 'block';
      }
      showhide();
    </script>

Hi @aaronocampo,

How would I go about implementing this?

Thanks for your help!

Kai :smile: