This Pro tutorial provides the JavaScript code that will automatically switch to the tab when using Nestable Tabs elements based on the "tab" URL parameter in Bricks.
Let's say there is a Tabs (Nestable) element on "Sample Page" whose frontend URL is:
https://example.com/sample-page
By default, the first tab will be the open/active one.
Now you want the 2nd tab to be open on page load. Just append that tab's slug as the value of a tab
query string.
https://example.com/sample-page?tab=title-2
With the JavaScript in place, this will be the result:
The user can click on any other tabs to switch to them as usual.
Step 1
Edit your Page/Template with Bricks.
At Settings (gear icon) → PAGE SETTINGS → CUSTOM CODE → Body (footer) scripts paste:
This is a BricksLabs Pro tutorial.
For full access login below or create your BricksLabs Pro account