Create a pop-up image in a section

2 posts by 2 authors in: Forums > CMS Builder
Last Post: September 30, 2019   (RSS)

By andreasml - September 29, 2019

Hi,

I would like to add a link on a field's "Field description" text-box of a certain section, which will pop-up a specific image. 

I have created a link like

<a href="/image.jpeg" target=_blank>(Press here to see the image)</a>

but it obviously opens the image.jpeg in a new page, which is something I do not want.

Kind regards

Andreas Lazaris

By daniel - September 30, 2019

Hi Andreas,

It sounds like you want to have the image pop up as an overlay without leaving the page - is that correct? For that sort of effect, you'll need to use a 3rd-party lightbox or modal library. This is one that I've used a few times in the past that is fairly simple to set up: https://lokeshdhakar.com/projects/lightbox2/

Hope that gets you pointed in the right direction!

Cheers,

Daniel
Technical Lead
interactivetools.com