Topic: how to set up initialisation for Lightbox
photokengoldstein-com-au pro asked 5 years ago
Jakub Strebeyko staff answered 5 years ago
To turn a bunch of pictures into a full-fledged interactive gallery using MDB Lightbox you need two things in your project:
html structure in place, including nested
img tags with proper classes in place (check out the example here)
Init function somewhere in our JS files. The preferred way to do it is to create an
html document exactly the same way as all the others are attached - in between
script tags, with
src attribute pointing at location of
any-name-you-like-really[dot]js file. There is one requirement - it must come after
mdb.min.js or any other file that might be needed to run our splendid LightBox Gallery.
In case of questions, don't hesitate to ask.
Aleksandar Srbljak pro commented 4 years agoHi, i have done like you said it, but it won't work, and i don't know why..i have copied lightbox gallery with heading and created new js file with initialization code, and still doesn't works..how can i fix that ? Thanks !
Ollie Vincent pro commented 4 years agoHave you checked the filepath for you JS file? If so - try pasting the lightbox script at the bottom of your html file - just before the closing body tag.
Ivo Zincovsky free commented 3 years ago
@Aleksandear Have you uploaded it on the server, or you've tested on your desktop? Don't know why, but it doesn't work until you upload it or run on local server.
Bartłomiej Malanowski staff answered 5 years ago
obibas pro commented 5 years agocan I also put it after mdb.min.js? It is not working on my page, what am I doing wrong? https://blacksheepsnowboardschool.com/blog/splitboarding-the-lofoten.html
jay2jam pro answered 5 years ago
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Pro
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No