Apologies for my English...
I found this code here, but it was missing the close button.
Above on the Website I have,
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" rel="stylesheet"/>
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/js/bootstrap.min.js"> </script>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.2.0/ekko-lightbox.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.2.0/ekko-lightbox.min.css" rel="stylesheet" />
In my HTML,
<div class="container">
<div class="row">
<a href="photo/113.jpg" data-toggle="lightbox" data-gallery="gallery" class="col-md-3" >
<img src="photo/113.jpg" class="img-fluid rounded">
</a>
<a href="photo/2-2.jpg" data-toggle="lightbox" data-gallery="gallery" class="col-md-3">
<img src="photo/2-2.jpg" class="img-fluid rounded">
</a>
<a href="photo/3-2.jpg" data-toggle="lightbox" data-gallery="gallery" class="col-md-3">
<img src="photo/3-2.jpg" class="img-fluid rounded">
</a>
</div>
</div>
style.scss
.row {
margin: 15px;
}
image { width: 70%; padding-left: 3rem;}
The Javacript Code,
$(document).on("click", '[data-toggle="lightbox"]', function(event) {
event.preventDefault();
$(this).ekkoLightbox();
});
But I couldn't figure out how to add the close button when displaying the image.
https://i.sstatic.net/Gfilp.png
If someone could kindly explain in simple terms how to add the close button, I would greatly appreciate it. Thank you!