Question:
I have a Project Page with a Wix Pro Gallery slide showing some project images.
Is that possible to add a progress bar that increases or decreases its value after clicking on the navigation buttons (back and forth)?
My Wix Pro Gallery is connected to a CMS
Product:
Wix Studio Editor
What have you already tried:
I started with this… I know that is missing the onClick event, but I’m no good with codes yet… haha
let itemCount = $w(“#galleryoto”).items.length;
$w(“#progressBar1”).value = itemCount;
$w(“#progressBar1”).targetValue = 1;
Thanks!
I got some part of the code done:
It returns the total number of items(photo, videos) from the dataset of my progallery, now my progress bar has the targetValue:
$w(‘#mydataset’).onReady(() => {
let myitems = $w(“#progallery”).items.length;
$w(“#progressBar”).targetValue = myitems;
$w(“#progressBar”).value = 1;
})
My question now is how do I change the progressBar.value according to the item (image, video) displaying by the progallery?
I tried this code, but nothing happens:
export function progallery_change(event) {
$w(“#progressBar”).value = event.target.getCurrentItem + 1;
}
I still trying here, but if you guys could help me, will be great!
Thanks!