Code

Change Active Webflow Tab

Change the default Webflow active tab on your Webflow site with this custom Javascript code.

Change Active Webflow Tab preview

Change the default Webflow active tab on your Webflow site with this custom Javascript code.

How to add it

  1. Add the Javascript code to your closing body custom code section
  2. Update the class names and the number to the tab you want selected

The code

Javascript
                      <!-- Add to body close section -->
<script>

// Change the 3 to the number tab you want to be active

	$(".your-tab-class").removeClass("w--current");
  	$(".your-tab-class:nth-child(3)").addClass("w--current");
  	
</script>

                    

Browse similar code snippets

Language

More from Timothy Ricks

Profile →

Related Webflow questions

All answers →

Similar code snippets

All code snippets →