Jump to content

Caption in lightbox only, no code injection

Recommended Posts

14 minutes ago, Levinant5150 said:

I need help creating an image gallery that displays a caption only when the image is in lightbox mode. I am on a personal plan and cannot use javascript/code injection. I've tried everything and cannot find a CSS solution.

You need javascript because the caption is not available on the Lightbox Gallery's DOM, so Javascript is used to port the lightbox from the Gallery section caption.
May you consider to use Grid gallery block with lightbox enabled? Check this

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 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

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.