Image with hover effect + pfd link opens in lightboxBrowser Info Environment
So i'm currently working on this project:http://www.udh-ronse.be/index.php...
At the slide with the activities (Activiteiten 2015) i want to have images with a pfd link that opens in a lightbox + the images have a hovereffect (with another image).
So i can't use the content block because that takes away the hover effect, and i can't use the image block because that takes away opening the pfd in a lightbox.
You could try this:
1. Add an image block with hover effect and a link to the PDF.
2. Click on the Image block, choose Design & Custom Template, click on the Gear Icon and add a Custom Class, for instance "pdf-link".
3. Add an HTML block to the same slide with the following code:
Now all image blocks with the class "pdf-link" should open the link in a lightbox.
Hope this works for you!
I'm having some problems for showing the pictures the right size in de lightbox.
For instance on a small mobile: can i scale the image? I can't seem to get it working.
Edit: in other words:
How can i make the popup window fit the size of the image + make it responsive? I looked through the documentation of magnific popup but i can't find the solution.
The code I posted was meant for PDF files, if you plan to open images you only need to change the type from "iframe" to "image" (Magnific Popup works very well with images, it will take care of making them responsive, etc.)
If you want to open both PDF files and images you can use the following code:
And then add the class "pdf-link" or "image-link" depending on the type of content you want to open.
Another easy and perfect solution that works. Thanks again!