N
N
Novamoscow2017-03-17 19:34:23
css
Novamoscow, 2017-03-17 19:34:23

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;
}


And an example of the JS itself
<script>
    $( function()
    {
        $( 'a' ).imageLightbox();
    });
</script>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Karen Mnatsakanyan, 2017-03-17
@Novamoscow

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 question

Ask a Question

731 491 924 answers to any question