Jump to content

How to make a lightbox for an image open by clicking on a text box?

Recommended Posts

Posted

Hi all, I hope you are well.

I am looking for a way to add code so that when someone clicks on the text boxes which overlay each of my images on hover, it opens up the lightbox for the image underneath.

I have attached an screenshot of one image pre-hover and another when the cursor hovers over it for reference. I want a click anywhere in the text box to lead to the lightbox.

Hope this helps.

Screenshot 2024-06-01 at 14.25.54.png

Screenshot 2024-06-01 at 14.25.47.png

  • 3 weeks later...
Posted
On 6/3/2024 at 8:41 AM, tuanphan said:

So you want

Initial: show image

Hover: show image, show a dark overlay, show a text

Click: open a lightbox with bigger image version

?

Hi, that is correct. Eventually I’d like to join up these lightboxes of single images on a page too but I know i will need a third party app at that time

Posted
On 6/20/2024 at 12:38 AM, atmos said:

Hi, that is correct. Eventually I’d like to join up these lightboxes of single images on a page too but I know i will need a third party app at that time

You mean when clicking image >> Show lightbox.

If pages has 10 images, then in lightbox, it will show 10 images (in slideshow format, so users can click to see other images within lightbox)?

 

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!)

Posted
2 hours ago, tuanphan said:

You mean when clicking image >> Show lightbox.

If pages has 10 images, then in lightbox, it will show 10 images (in slideshow format, so users can click to see other images within lightbox)?

 

Yes that is correct. They are not in a gallery though and are separately placed images as it gives me more control on the presentation/layout.

  • 3 months later...
Posted
On 6/21/2024 at 6:13 PM, atmos said:

Yes that is correct. They are not in a gallery though and are separately placed images as it gives me more control on the presentation/layout.

On 6/20/2024 at 12:38 AM, atmos said:

Hi, that is correct. Eventually I’d like to join up these lightboxes of single images on a page too but I know i will need a third party app at that time

Atmos, since you already purchase Lightbox Studio, follow this will be handy to connect all the lightbox altogether, wether is section-wide or page-wide

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> No-code customisations for Squarespace

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.