1

I am making a web site in node js with a handlebar template. I have followed the instructions shown in the doc. But getting an error that Uncaught ReferenceError: lightbox is not defined

My CSS and js files are in the public/dist/lib folder and my handlebar file is in the views folder

Here is the code:

<script src="../../public/assets/lib/jquery/dist/jquery.min.js"></script>
<script src="../../public/dist/lib/lightbox2/dist/js/lightbox-plus-jquery.js"></script>
<link rel="stylesheet" href="../../public/dist/lib/lightbox2/dist/css/lightbox.css">
<div class="col-md-6" id="demoImg">
                <div class="card_container">
                    <div class="Card1"><a class="hover-shadow cursor" data-lightbox="roadtrip"><img
                                src="/assets/images/site/image 3.png"></a>
                    </div>
                    <div class="Card1"><a class="hover-shadow cursor" data-lightbox="roadtrip"><img
                                src="/assets/images/site/image 5.png"></a>
                    </div>
                </div>
                <div class="card_text">
                    <h3>Dufranewatches.com</h3>
                </div>
            </div>
Jayna Tanawala
  • 475
  • 10
  • 27
  • 1
    `lightbox-plus-jquery.js` this contains lightbox + jQuery, either remove jquery.js or use the file which has only lightbox. – kiranvj Dec 31 '20 at 10:15
  • 1
    Yes, @kiranvj, that's true. I solved the issue.. I was passing the wrong path for CSS and javascript – Jayna Tanawala Dec 31 '20 at 10:57

0 Answers0