# Custom Module Lightbox Gallery Not Showing Close Link

**URL:** <https://community.hubspot.com/t/custom-module-lightbox-gallery-not-showing-close-link/12981>\
**Category:** CMS Development\
**Created:** [February 13, 2019, 4:32pm UTC](https://community.hubspot.com/t/custom-module-lightbox-gallery-not-showing-close-link/12981 "2019-02-13T16:32:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MegatPrivy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/megatprivy/32/68963_2.png) [@MegatPrivy](https://community.hubspot.com/u/MegatPrivy)\
**Post date:** [February 13, 2019, 4:32pm UTC](https://community.hubspot.com/t/custom-module-lightbox-gallery-not-showing-close-link/12981/1 "2019-02-13T16:32:38Z")

</div>

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,](https://www.bluleadz.com/blog/how-to-create-an-image-gallery-in-hubspot-using-hubdb?success=true) 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.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/b/5/b5dd0eace17f4a42921395e568345bf3605ae369.jpeg)

 ![Screen Shot 2019-02-13 at 11.27.00 AM.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/b/9/b901c2d5a5ffd9904f5053d6601f252e9d887ab5.jpeg)

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.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/e/8e8d1f6f314536e23667afcf35cc633f44e0dc25.jpeg)

 ![Screen Shot 2019-02-13 at 11.27.34 AM.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/f/b/fbe4aca6bf71d1c564bcc679ed3408224965a651.jpeg)

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](https://bitbucket.org/snippets/bluleadz/9ekLjz), and I followed the tutorial step by step creating the custom module. Any help on this would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![mherzog](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mherzog/32/5125_2.png) [@mherzog](https://community.hubspot.com/u/mherzog)\
**Post date:** [February 26, 2019, 8:15pm UTC](https://community.hubspot.com/t/custom-module-lightbox-gallery-not-showing-close-link/12981/2 "2019-02-26T20:15:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MegatPrivy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/megatprivy/32/68963_2.png) [@MegatPrivy](https://community.hubspot.com/u/MegatPrivy)\
**Post date:** [February 26, 2019, 8:17pm UTC](https://community.hubspot.com/t/custom-module-lightbox-gallery-not-showing-close-link/12981/3 "2019-02-26T20:17:31Z")

</div>

Thank you for your help! Here is a preview link: [http://www.privy.com/customer-examples-0?hs\_preview=suOoLZEE-7553068615](http://www.privy.com/customer-examples-0?hs_preview=suOoLZEE-7553068615)

---

<div class="post-metadata">

**Author:** ![mherzog](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mherzog/32/5125_2.png) [@mherzog](https://community.hubspot.com/u/mherzog)\
**Post date:** [February 26, 2019, 8:26pm UTC](https://community.hubspot.com/t/custom-module-lightbox-gallery-not-showing-close-link/12981/4 "2019-02-26T20:26:51Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![MegatPrivy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/megatprivy/32/68963_2.png) [@MegatPrivy](https://community.hubspot.com/u/MegatPrivy)\
**Post date:** [February 26, 2019, 9:14pm UTC](https://community.hubspot.com/t/custom-module-lightbox-gallery-not-showing-close-link/12981/5 "2019-02-26T21:14:15Z")

</div>

Ah that was it! Thank you so much!
