With this callback, you can check the value of an element before the user can continue to the next step.
You can also use Actions to Go to a Step, Go to a Topic or Deactivate the topic when an element is visible or not.
Implementing the callback
Using this callback requires jQuery. Developers can prepare a function that will be within the application source code. Here we have defined imSkipElement function, which can be called as my_callbacks.imSkipElement from within the Authoring tool.
Using the function in the Authoring tool
In the Authoring tool, you can re-use the callback wherever necessary.
In the Authoring tool:
- Within the Callbacks panel, add a callback my_callbacks.imSkipElement in On active section.
- Click + under Custom data tab.
- Provide names element, op, and step and values the selector of the element, visible or hidden, and the step number to jump to.
- The example below will check if the selected element is visible. If it is, it will jump to the 6th step.
In case you want to skip a step if the element is there but not visible or element is not there at all, change the else if line to:
so the result will be: