Skip to content
Advertisement

Tag: gallery

how to expand an image on click with JS?

I created a gallery using the following codepen and now I’m trying to add the function click to expand an image, using this JS method. Sadly I cannot get it to work. Any advice would be very helpful, either regarding this expand option or an alternative. Mind you I’m completely new to JS. Thanks in advance! Answer So after asking

Photoswipe opens only first or second image

I need to have every two of images in gallery embed with extra <div>. I managed Photoswipe to use all images in that gallery. But I can’t fix problem: when I click on any thumb (not first or second one), Photoswipe every time opens only first or second image from firs <div>. Codepen DEMO here Thank you for any advice

OnClick thumbnails – load image

I have a simple image gallery of about 25-30 photos with a thumbnails strip What i want is to load only the image that i click the thumbnail for not to wait until all the 25-30 photos are loaded because it slows down my website. Any ideas how to do that? Answer First, put all 25-30 photos on the page

Advertisement