# Opening custom sharing menu on button click

**URL:** <https://forum.wixstudio.com/t/opening-custom-sharing-menu-on-button-click/78260>\
**Category:** Ask the community\
**Tags:** wix-studio, question\
**Created:** [May 20, 2026, 2:42pm UTC](https://forum.wixstudio.com/t/opening-custom-sharing-menu-on-button-click/78260 "2026-05-20T14:42:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eglass](https://avatars.discourse-cdn.com/v4/letter/e/90db22/32.png) [@eglass](https://forum.wixstudio.com/u/eglass)\
**Post date:** [May 20, 2026, 2:42pm UTC](https://forum.wixstudio.com/t/opening-custom-sharing-menu-on-button-click/78260/1 "2026-05-20T14:42:12Z")

</div>

**I’m having trouble with**  
I’m having trouble making a menu open when I click a button on the page.

**Working in**  
WIX Studio

**Site link**  
Can’t share a link, sorry.

**What I’m trying to do**  
I have a sharing menu much like the mobile hamburger menu that is accessible from desktop too. And I want it to be able to pup up and show not only from the button in the header, but also a few pages have a button in them that opens it too.  
Currently… when I press one of the buttons, all that happens is the screen becomes dim, like it does when the menu is opened from the header, but the actual menu container doesn’t appear.

**What I’ve tried so far**  
So far I’ve tried .open() as well as show(), expand(). I’m not sure what else there is.

**Extra context**  
below is the menu open when I click via the “Share” button in the header

 ![Screenshot 2026-05-19 155157](https://us1.discourse-cdn.com/wix/original/3X/e/6/e65a4b0d699a2ca5f54184485fdcf895bae30583.png)

Below is what happens when I click one of the buttons. The screen dims, but the menu container doesn’t appear.

 ![Screenshot 2026-05-19 155144](https://us1.discourse-cdn.com/wix/original/3X/2/1/21326b8675edec3366ff895afaa2748d72433c93.png)

---

<div class="post-metadata">

**Author:** ![noahlovell](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/noahlovell/32/118920_2.png) [@noahlovell](https://forum.wixstudio.com/u/noahlovell)\
**Post date:** [May 20, 2026, 3:56pm UTC](https://forum.wixstudio.com/t/opening-custom-sharing-menu-on-button-click/78260/2 "2026-05-20T15:56:43Z")

</div>

I’m guessing this is custom - can you share the code you have? Where you’ve added it? And how this is structured - e.g. is this a Popup or a container in the header etc.

* * *

Something else to consider is using the out of the box option for adding a share button to the page - [Studio Editor: Adding and Customizing Share Buttons | Help Center | Wix.com](https://support.wix.com/en/article/studio-editor-adding-and-customizing-share-buttons)

---

<div class="post-metadata">

**Author:** ![eglass](https://avatars.discourse-cdn.com/v4/letter/e/90db22/32.png) [@eglass](https://forum.wixstudio.com/u/eglass)\
**Post date:** [May 21, 2026, 4:41pm UTC](https://forum.wixstudio.com/t/opening-custom-sharing-menu-on-button-click/78260/3 "2026-05-21T16:41:08Z")

</div>

I can’t seem to be able to add more different platforms to share with. I used a menu: ‘Hamburger Menu Container #hamburgerMenuContainer3’

```javascript
$w('#btnShareMenu').onClick((event) => {
    $w("#shareMenu").scrollTo();
    if ($w("#hamburgerMenuContainer3").opened) {
        $w("#hamburgerMenuContainer3").close();
    } else { $w("#hamburgerMenuContainer3").open(); }
});

```

**#shareMenu**

- menu button in header created with the menu

**#hamburgerMenuContainer3**

- container for the dropdown menu

**#btnShareMenu**

- Bew button on page to open Sharing Menu Container

I made a screenshot video, but I can’t seem to add it on here

---

<div class="post-metadata">

**Author:** ![Dan\_Suhr](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/dan_suhr/32/94074_2.png) [@Dan\_Suhr](https://forum.wixstudio.com/u/Dan_Suhr)\
**Post date:** [May 22, 2026, 3:23am UTC](https://forum.wixstudio.com/t/opening-custom-sharing-menu-on-button-click/78260/4 "2026-05-22T03:23:23Z")

</div>

I wouldnt use the hamburger menu.  
I would build using a lightbox or a container.

---

<div class="post-metadata">

**Author:** ![noahlovell](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/noahlovell/32/118920_2.png) [@noahlovell](https://forum.wixstudio.com/u/noahlovell)\
**Post date:** [May 22, 2026, 11:30am UTC](https://forum.wixstudio.com/t/opening-custom-sharing-menu-on-button-click/78260/5 "2026-05-22T11:30:25Z")

</div>

Exactly as Dan suggested 🙂 A Popup is probably the best way to go. Here’s how I’d approach it:

- Button in the Header of the site with a normal link (not via code), that opens the Popup
- In the popup, add a series of buttons for all the platforms you want people to be able to share on - replacing the buttons label/icons, and giving it a meaningful ID so it’s easier to work with in code.
- Then in the Popup, add code similar to the following:

```javascript
import * as wixSiteLocation from '@wix/site-location';

let currentPage;

$w.onReady(async function () {
    currentPage = await wixSiteLocation.location.url();

    $w("#fbShareBtn").link = "https://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent(currentPage);
    $w("#fbShareBtn").target = "_blank";
});

```

Then repeat for each link 🙂
