I was wondering how to do this - if i have a number of buttons and i want that each click on the button will be connected to a cetain slide from a slide show which appears near the list.
mean every click on the button will move the slideshow to the relevant slide.
Is there any example of how to do it ?
You should use a Slideshow element (found under “Interactive” section in the editor add panel), set the slides’ content and then, add a click event for your buttons, and add the code to handle the click. something like:
export function button1_click(event) {
$w("#mySlideshow").changeSlide(2);
}
HI!, So, I am trying to use this exact code, but it is reporting an error:
Wix code SDK error: The "slideInfo" parameter that is passed to the "changeSlide" method cannot be set to the value 2. It must be a slide from the "BGC" slideshow or an index between 0 and 1
code:
export function button1_click(event) {
$w('#BGC').changeSlide(2)
}