bholm Posted February 8, 2022 Posted February 8, 2022 Site URL: https://www.brookeholm.com/work/architecture Hey there, Trying to hide the photo captions from the masonry grid of images on this page - but would like them to show up once the lightbox opens upon clicking an image. Any way to accomplish this? Can't find any options on the settings. Thank you!
Beyondspace Posted February 12, 2022 Posted February 12, 2022 On 2/9/2022 at 6:00 AM, bholm said: Site URL: https://www.brookeholm.com/work/architecture Hey there, Trying to hide the photo captions from the masonry grid of images on this page - but would like them to show up once the lightbox opens upon clicking an image. Any way to accomplish this? Can't find any options on the settings. Thank you! 1. Home > Settings > Advanced > Code injection, choose footer <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $(document).ready(function(){ $('.gallery-lightbox-item-img').each(function(){ var alt = $(this).find('img').attr('alt'); $(this).append('<div class="lightbox-caption">' + alt + '</div>'); }); }); </script> 2. Home > Design > Custom Css figcaption.gallery-caption { display:none; } .lightbox-caption { position:absolute; bottom:0; color:white; text-align:center; width:100%; } Let me know how it works on your site Support me by pressing 👍 if this useful for you bholm 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
bholm Posted February 14, 2022 Author Posted February 14, 2022 Thank you so much this seems to work well! Wondering if there is a way to move it off the image though, to just underneath?
tuanphan Posted February 19, 2022 Posted February 19, 2022 On 2/15/2022 at 12:33 AM, bholm said: Thank you so much this seems to work well! Wondering if there is a way to move it off the image though, to just underneath? Don't remove any code Add this to Design > Custom CSS .lightbox-caption { bottom: -20px; z-index: 999999; } .gallery-lightbox-item-src { overflow: visible; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
bholm Posted February 25, 2022 Author Posted February 25, 2022 Thank you so much this works much better! The text disappears on phone version, which is not a big deal, but is that normal? Thanks!
tuanphan Posted February 27, 2022 Posted February 27, 2022 On 2/26/2022 at 1:23 AM, bholm said: Thank you so much this works much better! The text disappears on phone version, which is not a big deal, but is that normal? Thanks! Add this to Design > Custom CSS /* lightbox disappear on mobile */ @media screen and (max-width:767px) { .lightbox-caption { bottom: 20% !important; } } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment