Reputation: 155
I am trying to use lightbox 2 and I can't seem to get it to work. I am currently testing it on one image and nothing is happening. Any help would be appreciated!
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="gallery.css">
<script src="js/jquery-1.11.3.min.js"></script>
<link href="css/lightbox.css" rel="stylesheet" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>
<a href="images/bethan6.jpg" data-lightbox="image-1"><img src="images/bethan6.jpg" /></a>
<script src="js/lightbox.js"></script>
</body>
Upvotes: 1
Views: 1296
Reputation: 86
It appears that you have invoked jQuery incorrectly, which would prevent Lightbox from working.
Try this:
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
Your current code would look through your own file system for code.jquery.com, which I hope you haven't taken the trouble to download.
EDIT: Judging from the Lightbox Documentation it doesn't seem that you need to include the <img>
tag in the <a>
tag. The image will display by itself.
Upvotes: 1