Slider JS API Events
Receiving Slide Changed Events
To receive events from tab changes setup an SA5 callback with the slideChanged event. When called, it will contain the slider object, and the index of the new slide ( 0-based ).
If you have multiple sliders marked with [wfu-slider], you can assign a unique name, and access it through slider.name, as in this example;
<script>
window.sa5 = window.sa5 || [];
window.sa5.push(['slideChanged',
(slider, index) => {
console.log("SLIDE CHANGED", slider.name, slider, index);
switch(slider.name) {
case "demo1": // Demo 1 slide changed
break;
case "demo2": // Demo 2 slide changed
break;
}
}]);
</script>Manipulating the Slider
Last updated
Was this helpful?