Community forum for knowledge and support

Updated 2 days ago

Inconsistent Auto-changing Tabs in Webflow Project

Hi everyone,
I'm using Header 103 (preview link) in a Webflow project for a client (live site). However, I'm experiencing an issue where the tabs should auto-change after a few seconds as the progress bar fills up—but this doesn't always happen consistently.
What's strange is that it seems to work fine in a private browser, so I'm unsure what might be causing the inconsistency. Since I come from a design background and don't have a strong coding knowledge, I’m not entirely sure how to troubleshoot or fix this.
If anyone has insights or can point me in the right direction, I’d really appreciate it!
Thanks in advance!

R
C
3 comments

Having the same issue, happens on mobile on Chrome for me, on Safari the auto change works fine. When I click on one it starts working, but after reloading the page and not clicking, it doesn't work.

changed the code with chatgpt to this, it works now for me:

<script><br /> var Webflow = Webflow || [];<br /> Webflow.push(function() {<br /> var tabTimeout;<br /> var lastTabClickTime = 0;<br /><br /> $(document).ready(function() {<br /> clearTimeout(tabTimeout); // Clear any previous timeouts<br /><br /> // Ensure the first tab is active if none is set as "current"<br /> if (!$('.header103_tab-link.w--current').length) {<br /> $('.header103_tab-link:first').addClass('w--current'); // Add 'current' class to the first tab<br /> }<br /><br /> tabLoop(); // Start the tab loop<br /><br /> // Add click listener to tab links<br /> $('.header103_tab-link').click(function() {<br /> lastTabClickTime = Date.now();<br /> clearTimeout(tabTimeout);<br /> tabTimeout = setTimeout(tabLoop, 6000); // Restart loop after interaction<br /> });<br /> });<br /><br /> function tabLoop() {<br /> tabTimeout = setTimeout(function() {<br /> // Ensure navbar is closed or tabs menu exists, and enough time has elapsed since the last interaction<br /> if (($('.w-nav-menu').length === 0 || !$('.w-nav-button').hasClass('w--open')) &&<br /> ($('.header103_tabs-menu').length && Date.now() - lastTabClickTime >= 6000)) {<br /> var $next = $('.header103_tabs-menu').children('.w--current:first').next();<br /><br /> if ($next.length) {<br /> $next.click();<br /> } else {<br /> $('.header103_tab-link:first').click();<br /> }<br /> }<br /><br /> // Recursively call tabLoop<br /> tabLoop();<br /> }, 6000); // 6-second delay<br /> }<br /> });<br /></script>

Add a reply
Sign up and join the conversation on Slack