# Close button for overlay

**URL:** <https://community.sitejet.io/t/close-button-for-overlay/2836>\
**Category:** Website Builder\
**Tags:** cms\_code, cms\_element\
**Created:** [January 17, 2024, 9:50pm UTC](https://community.sitejet.io/t/close-button-for-overlay/2836 "2024-01-17T21:50:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc\_Dudley](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@Marc\_Dudley](https://community.sitejet.io/u/Marc_Dudley)\
**Post date:** [January 17, 2024, 9:50pm UTC](https://community.sitejet.io/t/close-button-for-overlay/2836/1 "2024-01-17T21:50:42Z")

</div>

Hello!

I’m trying to build a pop-up that shows on load (which works through the builder fine). It’s essentially a redirection pop-up for a landing page. One button will take specific people to an alternate landing page, the other button should just close the pop-up and keep people on the main landing page. I don’t want to rely on people to find the ‘x’ at the top right of the overlay if the pop-up doesn’t apply to them.

I’ve found this solution to a similar problem: [How can I create a dismissable sticky div - #4 by Andre](https://community.sitejet.io/t/how-can-i-create-a-dismissable-sticky-div/1804/4)? However, when I implement the JS, the overlay closes, but the darker background doesn’t. Is there anything else I need to include?

Many thanks!

---

<div class="post-metadata">

**Author:** ![Lucian\_Dinu](https://dub1.discourse-cdn.com/flex017/user_avatar/community.sitejet.io/lucian_dinu/32/141_2.png) [@Lucian\_Dinu](https://community.sitejet.io/u/Lucian_Dinu)\
**Post date:** [January 18, 2024, 7:04am UTC](https://community.sitejet.io/t/close-button-for-overlay/2836/2 "2024-01-18T07:04:02Z")

</div>

Hi!  
You can add a button inside the overlay and add a link back to the overlay element (this will toggle - in this case close, the overlay).

Hope this helps!

---

<div class="post-metadata">

**Author:** ![Marc\_Dudley](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@Marc\_Dudley](https://community.sitejet.io/u/Marc_Dudley)\
**Post date:** [January 18, 2024, 6:35pm UTC](https://community.sitejet.io/t/close-button-for-overlay/2836/3 "2024-01-18T18:35:07Z")

</div>

That’s perfect, Lucian! Thank you so much for your help with this, and for all the other stuff you do within these forums.

I really appreciate it 😄

---

<div class="post-metadata">

**Author:** ![Andre](https://dub1.discourse-cdn.com/flex017/user_avatar/community.sitejet.io/andre/32/3459_2.png) [@Andre](https://community.sitejet.io/u/Andre)\
**Post date:** [January 19, 2024, 8:13am UTC](https://community.sitejet.io/t/close-button-for-overlay/2836/4 "2024-01-19T08:13:59Z")

</div>

Closed on January 19, 2024, 8:13am UTC


