Branching Attribute
Overview
The Jump Attribute plugin provides an easy way to navigate between screens based on the data-jump attribute. This plugin allows users to click on elements that are tagged with data-jump to trigger a screen transition.
Usage
To use the Jump Attribute plugin:
- Edit HTML: Click on Edit HTML in the screen editor.
- Add the
data-jumpAttribute: Add thedata-jumpattribute to any clickable element (such as buttons or links) in your HTML code. - Set the
data-jumpValue: Set the value of thedata-jumpattribute to the screen index you want to navigate to. - The screen index is a number (e.g.,
0,1,2, etc.) that corresponds to the screen order in the screens list. To find the index, check the number displayed before each screen title in the list of screens. - Clicking the Element: When the element is clicked, the plugin will automatically navigate to the screen corresponding to the index specified in the
data-jumpattribute.
Example
Here’s an example of how to use the Jump Attribute plugin in your HTML:
Example Usage
In this example, clicking the first button will navigate to Screen 1 (index 1), and clicking the second button will navigate to Screen 2 (index 2).
Benefits
- Easy navigation: Simply attach the
data-jumpattribute to any clickable element. - No additional setup: The plugin automatically handles screen transitions based on the attribute value.
- Minimal configuration: Just add the
data-jumpattribute and set the value to the screen index. No need for custom properties setup.
Notes
- The plugin works with any clickable element such as buttons, links, or custom elements.
- The value in the
data-jumpattribute should be an integer representing the screen index. The screen index is the number displayed before the screen title in the screens list (e.g.,0,1,2, etc.).