Use Lightbox with Swiper or Owl problem


Topic: Use Lightbox with Swiper or Owl problem

abtsolutions pro asked 2 years ago

Hello.

I try to integrate the MDB LightBox with a third-party library as Swiper (https://github.com/nolimits4web/swiper), Owl-carousel, because I need a swipeable carousel with different image sizes. I have a problem when the <figure> elements are included in a <div> tag - in this case the full photos are not swipeable.

Is it possible to make the full photos swipeable in case they are included in another tag? e.g., each figure is included as below:

<div class="some-class">
<figure>
<a href="https://mdbootstrap.com/img/Photos/Horizontal/Nature/12-col/img%20(117).jpg" data-size="1600x1067">
<img src="https://mdbootstrap.com/img/Photos/Horizontal/Nature/4-col/img%20(117).jpg" class="img-fluid">
</a>
</figure>
</div>
Thanks for help!

Mikołaj Smoleński staff answered 2 years ago

Hi there,

Unfortunately, Lightbox structure should be exactly the same as in our documentation (https://mdbootstrap.com/docs/jquery/javascript/lightbox/).

Did You try to add class="some-class" to each figure element instead wrapping it by another div?

Best Regards


abtsolutions pro commented 2 years ago

Hi, yes, but in this case the other plugin (Swiper or Owl) doean't work!

Btw, it would be better to implement a swipeable carousel in MDB...


Mikołaj Smoleński staff commented 2 years ago

Thanks for Your remarks. I am adding Your issue to our list of ideas for the future.

Best Regards


Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: jQuery
  • MDB Version: 4.5.15
  • Device: ALL
  • Browser: ALL
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No