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!

Community Page
Last updated: