Swiper on modal active slide based on thumbnail click

Hello I have a Swiper slideshow inside a modal.
I would like to set the active slide based on the thumbnail clicked.

Using the following code
dmx-on:shown-bs-modal="swiper1.update();swiper1.slideTo(cookies1.data.active_photo)"
which is actually is triggered when a thumbnail is clicked.

And it what it does is when the modal is shown -> it updates the Swiper -> sets the active slideshow based on a cookie value.

The cookie value is being set alright on every thumbnail click.

Thank you!

Hi Niko,
So what is your question/what is not functioning properly?

Yes the issue is that it always sets the first photo as active, no matter which one of the thumbnails I click.
Here is the link btw.
https://orbitlogistics.gr/md_index_2.html
Just click any of the thumbnails
Thank you!

Please try using the .toNumber() formatter for the cookie value in the slide to action, as it seems to be a string. MAke sure the formatter js file is included in the head tags.

ah yes this could be the case.
Will try it and let you know.
Thank you!

Unfortunatelly it wont do. I also bind the cookie value inside the modal to verify it is being updated. Its ok if not working. I might try another slider (jquery one).

Thank you