Search...
onChange( )
Adds an event handler that runs when the slideshow moves to a new slide.
Description
A slideshow moves to a new slide through user actions, such as clicking on navigation or slide buttons, or programmatically, using functions such as changeSlide(), play(), previous( ), and next( ).
Note: You can see the
Slideshow
element in the Velo Properties & Events panel, but itsSlide
elements are not visible there.
Syntax
function onChange(eventHandler: EventHandler): SlideshoweventHandler: function EventHandler(event: Event): void
onChange Parameters
NAME
TYPE
DESCRIPTION
eventHandler
The name of the function or the function expression to run when the slideshow moves to a new slide.
EventHandler Parameters
NAME
TYPE
DESCRIPTION
Returns
This function does not return anything.
Return Type:
void
Related Content:
Was this helpful?
Get the index of the slide to which the slideshow moved
Copy Code
1$w("#mySlideshow").onChange( (event) => {2 let currentIndex = event.target.currentIndex; // 33} );