3

I have a problem with lightbox. After clicking the image file it just redirects me to the image. This is the code in the cshtml.

<a href="" data-lightbox="screenshot" >
<img src="" />
</a>

The href and src's values are automatically being inserted by a jquery code and is guaranteed to be the same image. The styles and scripts that are necessary are also inserted.

<script src="../../Scripts/jquery-1.11.0.min.js" ></script>
<script src="../../Scripts/lightbox.min.js" type="text/javascript"></script>
<link href="../../Styles/lightbox.css" rel="stylesheet" type="text/css" />

How do I view the image using lightbox instead of it redirecting? I followed the instructions in this link but it still did not work: http://lokeshdhakar.com/projects/lightbox2/

1 Answers1

2

Put the

<script src="../../Scripts/lightbox.min.js" type="text/javascript"></script>

line at the end, before the closing /body