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-jump
Attribute: Add thedata-jump
attribute to any clickable element (such as buttons or links) in your HTML code. - Set the
data-jump
Value: Set the value of thedata-jump
attribute 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-jump
attribute.
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-jump
attribute to any clickable element. - No additional setup: The plugin automatically handles screen transitions based on the attribute value.
- Minimal configuration: Just add the
data-jump
attribute 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-jump
attribute 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.).