-
AuthorPosts
-
May 22, 2019 at 6:35 am #1103163
Hi! Is it possible to disable the “click-through” feature when clicking on an image to enlarge it? I am inserting an image via the “media” link, and I have set it to open the full scale image when the smaller image is clicked. However, that’s all I want it to do. The default is to show all the images, on the page, each time the user clicks on the enlarged version of the photo (like a click-through gallery). I would like the user to just click the smaller image so they can see an enlarged version of the same image. That’s it. When they click it again, I want it to close (or at least not open up other images).Thanks in advance for your help!
May 23, 2019 at 5:55 am #1103558Hey webdesign,
I’m not really sure what you’re trying to achieve, can you give us a link to the page showing what you mentioned? so we can have more context.
Best regards,
NikkoMay 25, 2019 at 8:30 pm #1104203Yes, this is fairly straightforward. If you look at any Enfold page that has clickable images, the default is to open in Lightbox, and to allow the user to click through all of the images (each time the user clicks on the enlarged verion of the image, or clicks on the arrow). I do not want the user to see any other image, other than the one they clicked to enlarge. It is confusing to see images that may be outside of a particular element, and that may be irrelevant. I just want the image, when clicked, to enlarge, and then close on click. Here is your example theme which shows what I’m referring to (click an image, it gets larger, but then you continue to click through all the images, instead of just seeing this one image):
Thanks!
May 26, 2019 at 10:16 pm #1104364Hi,
Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:.mfp-gallery .mfp-image-holder .mfp-figure { pointer-events: none !important; } .mfp-gallery button.mfp-arrow { display: none !important; }
This will remove the arrows and a second click on the enlarged image will close it.
Please clear your browser cache and check.Best regards,
MikeMay 26, 2019 at 10:42 pm #1104366Beautiful! A solution to my problem. I tried removing the arrows with css earlier, which worked, but it still left the problem of clicking through. This worked perfectly. My client will be very happy. Thank you so much!!!
May 26, 2019 at 10:45 pm #1104367Actually, can I ask one more favor??? Is there a way to remove the total number of photos that display in the bottom right corner? For instance, if there are 15 photos on a page, and I click the photo to enlarge, it says 1/15, etc. Since they won’t be seing any more than just that one photo, is would be great if that would not display. Thanks :)
May 26, 2019 at 11:58 pm #1104372Hi,
Please try including this css:.mfp-gallery .mfp-counter { display: none !important; }
Best regards,
MikeMay 27, 2019 at 12:08 am #1104374Yahooozy! It works right out of the box. I love it when that happens! Thanks again for your great support. This is one of the reasons I keep designing websites with your theme. Thanks again and cheers!
May 27, 2019 at 2:03 am #1104382Hi webdesign,
We’re glad that we could help :)
Thanks for using Enfold and have a great day!Best regards,
Nikko -
AuthorPosts
- The topic ‘Disable the "click-through" on images’ is closed to new replies.