Reputation: 11
I followed all steps on the Lightbox website. But whenever I click on the image it just opens up in a new page.
<head>
<link href="path/to/lightbox.css" rel="stylesheet">
</head>
I dont have jquery so I used lightbox-plus-jquery.js. Also here is the code for displaying the image.
<script src="path/to/lightbox-plus-jquery.js" type="text/javascript"> </script>
</body>
<a href="images/pics04.jpg" data-lightbox="image-1" data-title="Data"><img src="images/pics04.jpg" width="250" height="200" alt=""></a>
Plus how do I display text when the image is clicked? Thanks
Upvotes: 1
Views: 851
Reputation: 9
You need to replace the 'path/to' bit in the code with your actual path (i.e. location of the file)
Upvotes: 0
Reputation: 21
I had the same issue. I did not follow the directions completely. It says to place the script tag linking to the lightbox at the bottom of the page just above the body tag. I put mine in the head with the rest and it did not work. Moving the script tag for the lightbox down to the bottom just above the closing body tag should solve your problem.
Upvotes: 2