Last updated
Was this helpful?
Last updated
Was this helpful?
Documentation in progress.
Outside of callback events, you can also access the SA5 Tabs object by constructing one explicitly;
Once you have this, you can call its methods and properties;
name
property returns the [wfu-tab]
name, if one was set.
currentIndex
gets or sets the 0-based index of the current tab ( i.e. 5 tabs would be numbered 0, 1, 2, 3, 4 ).
currentNum
gets or sets the 1-based index of the current tab ( i.e. 5 tabs would be numbered 1, 2, 3, 4, 5 ).
goToFirst()
navigates to the first tab
goToLast()
navigates to the last tab
goToPrev()
navigates to the prev tab
goToNext()
navigates to the next tab
To receive events from tab changes setup an SA5 callback with the tabChanged
event. When called, it will contain the tabs object, and the index of the new tab ( 0-based ).
If you have multiple tabs elements marked with [wfu-tabs], you can assign a unique name, and access it through tabs.name
, as in this example;
For example;
These examples assume that;
You have a Slider
The Slider has a wfu-slider
attribute with a value of slider1
You have the SA5 library installed
First, setup the slider object-
Setup any buttons or other triggers you want, to perform other navigations.
For example, suppose we have a button with an ID of buttonNext
and we want it to navigate to the next slide;
See for more.