Answer the question
In order to leave comments, you need to log in
Image-lightbox plugin how to set it up correctly?
I don't know much about JQ and JS. Please help.
The task is simple, open the image when you click on the full screen. (Plus, when I click on one picture, I want to open a gallery of several)
I found such a plugin for this business.
https://osvaldas.info/image-lightbox-responsive-to...
But as usual, there was a difficulty in the first run.
Can I ask you for help with writing a simple example (enlarge one image on click)
Here is an example of HTML code from the documentation
CSS example
<img src="picture.jpg" id="imagelightbox" />
#imagelightbox
{
position: fixed;
z-index: 9999;
-ms-touch-action: none;
touch-action: none;
}
<script>
$( function()
{
$( 'a' ).imageLightbox();
});
</script>
Answer the question
In order to leave comments, you need to log in
Correct example
<a href="picture.jpg">
<img src="picture.jpg" />
</a>
<script>
$( function()
{
$( 'a' ).imageLightbox();
});
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question