Topic: Adding multiple lightboxes to multiple tab pages
billywinter pro asked 5 years ago
I would like to have a multiple tab page and have each tab assigned to different picture subjects. I added a lightbox to the first tab and it works fine. When I copied and pasted the identical code to other tab pages, only the first tab works. Is there anything special that needs to be set up to get multiple lightboxes working on the same page within different tabs?
MDBootstrap staff answered 5 years ago
Hi billywinter,
I found your snippet, and made a similar one, with working lightboxes: you: https://mdbootstrap.com/snippets/jquery/pjoter-2-0/823365
Important thing: try to make the first lightbox always visible. I know it might be unintuitive, but this version of lightbox works because I initialized empty lightbox on top of everything, that doesn't take up space, and is always visible.
If you need additional help I am here for you.
Best regards, Piotr
billywinter pro answered 5 years ago
I also created a snippet with code to demonstrate this. Not sure how to connect snippet here but search "2 lightboxes in different tab" and you will see it.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: Pro
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: all
- Browser: all
- OS: all
- Provided sample code: No
- Provided link: No