Open Switcher State Based on URL Parameter
Programmatically opens a specific JetTabs switcher state based on URL parameters, optionally scrolling to the switcher.
Specifications
Open Switcher State Based on URL Parameter
7 January, 2026
-
Plugin
-
Category
-
Programming languages
Installing Instruction
- Copy the provided JavaScript code snippet to your clipboard.
- Add the code using one of the following methods:
-
Option A: Using a Custom Code Plugin (Recommended)
- Install and activate a plugin such as WPCode Lite, Code Snippets, or Simple Custom CSS and JS.
- Create a new JavaScript snippet.
- Paste only the JavaScript code, without <script> tags.
- Save and activate the snippet.
-
Option B: Using a Custom Code / HTML Area
- Add the code in a Custom HTML widget or directly into a theme file (for example, header.php or footer.php).
- Keep the <script> tags when using this method.
- Save your changes.
-
Option A: Using a Custom Code Plugin (Recommended)
Example Use Case
Use this snippet to create deep links to specific tab states for better navigation and user guidance in JetTabs-powered tabbed content.
Applicable scenarios:
- Linking directly to specific tab states from external pages or marketing campaigns.
- Enhancing user navigation by remembering last visited tab states via URL.
- Supporting dynamic tab behavior based on URL query strings for personalized content.
Specifications
Open Switcher State Based on URL Parameter
7 January, 2026
-
Plugin
-
Category
-
Programming languages