lightbox2

Chrome Failted to Load Resources Error 404 How to Fix for lightbox2


Failed to load resource: the server responded with a status of 404 (Not Found) mistakes shows himself in console for Lighbtox.js. I downloaded the file and put into the my js file, I put the url path corrcetly to the bottom of my project after bootstrap and jquery js files.

I downloaded the file from original place.


Solution

  • I created a minimal working example as follows. It does work with the latest jquery. Make sure jquery script tag is before the lightbox script tag.

    my index.html

    <html>
        <head>
            <script src="js/jquery-3.4.1.min.js"></script>
            <link href="css/lightbox.min.css" rel="stylesheet" />
        </head>
        <body>
            <a href="images/image-1.png" data-lightbox="image-1" data-title="TESTING">Image #1</a>
            <script src="js/lightbox.min.js"></script>
        </body>
    </html>
    

    File structure

    code

    And the result

    lightbox