Currently working on a project to create a lightbox with thumbnails for educational purposes. However, I am encountering some difficulties with the code:
The event handlers are not triggering after the overlay appears, which has content inserted into it via jQuery (It would be helpful if you could also clarify why the event handlers are not functioning).
- Are there any simple lightbox alternatives available that are suitable for learning purposes?
Below is the code snippet:
$(function(){
// JavaScript code goes here
});
/* CSS code goes here */
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="lb">
<ul class="thumbnails">
<li><img class="thumbnail" src="_images/image1.jpg" data-src="_images/image1.jpg" width="100" height="100"></li>
<li><img class="thumbnail" src="_images/image2.jpg" data-src="_images/image2.jpg" width="100" height="100"></li>
<li><img class="thumbnail" src="_images/image3.jpg" dta-src="_images/image3.jpg" width="100" height="100"></li>
<li><img class="thumbnail" src="_images/image4.jpg" data-src="_images/image4.jpg" width="100" height="100"></li>
</ul>
</div>