bholm Posted February 8, 2022 Share 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! Link to comment
Beyondspace Posted February 12, 2022 Share 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 (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
bholm Posted February 14, 2022 Author Share 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? Link to comment
tuanphan Posted February 19, 2022 Share 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 How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
bholm Posted February 25, 2022 Author Share 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! Link to comment
tuanphan Posted February 27, 2022 Share 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 How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment