Hey everyone!
So I have this problem when the nav bar is open it will close automatically when the tab section at the top changes. I think it is due to some custom code. Is there a fix for this?
Here is the code
<script>
var Webflow = Webflow || [];
Webflow.push(function () {
// DOMready has fired
// May now use jQuery and Webflow api
// start everything
var tabTimeout;
clearTimeout(tabTimeout);
tabLoop();
// define loop - cycle through all tabs
function tabLoop() {
tabTimeout = setTimeout(function() {
var $next = $('.tabs-menu').children('.w--current:first').next();
if($next.length) {
$next.removeAttr("href").click(); // click resets timeout, so no need for interval
} else {
$('.tab-link:first').removeAttr("href").click();
}
}, 5500); // 1ish second tab loop
}
// reset timeout if a tab is clicked
$('.tab-link').click(function() {
clearTimeout(tabTimeout);
tabLoop();
});
});
</script>