<script> // auto loading tabs var Webflow = Webflow || []; Webflow.push(function () { // Fix for Safari if (navigator.userAgent.includes("Safari")) { document.querySelectorAll(".acc_tab").forEach((t) => (t.focus = function () { const x = window.scrollX, y = window.scrollY; const f = () => { setTimeout(() => window.scrollTo(x, y), 1); t.removeEventListener("focus", f); }; t.addEventListener("focus", f); HTMLElement.prototype.focus.apply(this, arguments); })); } // Start Tabs function startTabs() { var tabTimeout; clearTimeout(tabTimeout); tabLoop(); // Connect your class names to elements. function tabLoop() { tabTimeout = setTimeout(function () { var $next = $('.acc_tabs-menu').children('.w--current:first').next(); if ($next.length) { $next.click(); // user click resets timeout } else { $('.acc_tab:first').click(); } }, 5000); // 5 Second Rotation } // Reset Loops $('.acc_tab').click(function () { clearTimeout(tabTimeout); tabLoop(); }); } // Run tabs function startTabs(); }); </script>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter