[SOLUTION] Setting Default Active Tab

Webflow seemed to start prefixing with the w- the classes for tab links and tab panes , causing the selectors for the original script to break. Just update your snippets so it matches the following:

<!-- START FIX: Always show the first tab first -->
<script>
  $(".tab-link").removeClass("w--current");
  $(".tab-pane").removeClass("w--tab-active");

  $(".tab-link:nth-child(1)").addClass("w--current");
  $(".tab-pane:nth-child(1)").addClass("w--tab-active");
</script>
<!-- END FIX: Always show the first tab first -->
2 Likes