Topic: JS Initialization is calling a HTML file
Daniel
pro
asked 6 years ago
When you use this initialization:
$(function () {
$("#mdb-lightbox-ui").load("mdb-addons/mdb-lightbox-ui.html");
});
From here:
https://mdbootstrap.com/javascript/lightbox/
This throws:
.../mdb-addons/mdb-lightbox-ui.html Failed to load resource: the server responded with a status of 404 (Not Found)
What is the correct code?
In the addon modules of MDB3 PRO folder there is no similar JS File, and it's kind a obvious this wont work, but what is the correct code? can you correct this?
Add comment
Daniel
pro
answered 6 years ago
I wrongly used MDB pro 3, instead this code is for MDB 4
Its very confusing.
vizmedia
pro
answered 6 years ago
You need to correct the path to the file
try: ..load("/mdb-addons/mdb-lightbox-ui.html"); or ..load("/your_path/mdb-addons/mdb-lightbox-ui.html");
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Specification of the issue
- User: Pro
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: Yes
- Provided link: No
Tags