CMS Development

MegatPrivy
Participant

Custom Module Lightbox Gallery Not Showing Close Link

SOLVE

Hello! I'm currently working on a customer's examples page and wante to create a grid-like gallery that allows the images to be clicked on and seen in a lightbox, then closed.

I found this helpful article here that helped me set everything up, but even after following the tutorial and using the same code, my "Close" link is still missing when an image is overlayed in the lightbox. Images below for reference. 

What I want to see (example from article): 
Screen Shot 2019-02-13 at 11.26.53 AM.pngScreen Shot 2019-02-13 at 11.27.00 AM.png


What I'm seeing (no "close" option in the lightbox, and the overylay is fully dark): 
Screen Shot 2019-02-13 at 11.27.24 AM.pngScreen Shot 2019-02-13 at 11.27.34 AM.png

 

I'm aware I'll need to make all of the images around the same size to get the grid style I'm looking for, but am still puzzled as to why I can't find or see the "Close" link in my lightbox.  

All of the code I'm using is in this article also linked above, and I followed the tutorial step by step creating the custom module. Any help on this would be greatly appreciated!

0 Upvotes
1 Accepted solution
mherzog
Solution
HubSpot Product Team
HubSpot Product Team

Custom Module Lightbox Gallery Not Showing Close Link

SOLVE

Ah! So it seems like there's a problem with the js- rather than popping up the image in a "lightbox", it just redirects to the image's source url.

 

I took a quick peak at the module, and it looks like the js in the module's Javascript pane was wrapped in <script> tags. Since that's a designated javascript section, it meant we were adding additional script tags around that, and the js wasn't running at all.

 

I removed those, and it seems to be working- wanna give it a shot?

View solution in original post

4 Replies 4
mherzog
HubSpot Product Team
HubSpot Product Team

Custom Module Lightbox Gallery Not Showing Close Link

SOLVE

Hey there! I'm happy to dig into this from the HubSpot-side- any chance you have a preview link, or a live page, I could poke around in? There could be some other CSS at play here.

0 Upvotes
MegatPrivy
Participant

Custom Module Lightbox Gallery Not Showing Close Link

SOLVE

Thank you for your help! Here is a preview link: http://www.privy.com/customer-examples-0?hs_preview=suOoLZEE-7553068615

 

0 Upvotes
mherzog
Solution
HubSpot Product Team
HubSpot Product Team

Custom Module Lightbox Gallery Not Showing Close Link

SOLVE

Ah! So it seems like there's a problem with the js- rather than popping up the image in a "lightbox", it just redirects to the image's source url.

 

I took a quick peak at the module, and it looks like the js in the module's Javascript pane was wrapped in <script> tags. Since that's a designated javascript section, it meant we were adding additional script tags around that, and the js wasn't running at all.

 

I removed those, and it seems to be working- wanna give it a shot?

MegatPrivy
Participant

Custom Module Lightbox Gallery Not Showing Close Link

SOLVE

Ah that was it! Thank you so much! 

0 Upvotes