# how to open and close sidebar programaticaly

**URL:** <https://forums.fusetools.com/t/how-to-open-and-close-sidebar-programaticaly/3737>\
**Category:** How-to Discussions\
**Created:** [April 19, 2016, 5:30pm UTC](https://forums.fusetools.com/t/how-to-open-and-close-sidebar-programaticaly/3737 "2016-04-19T17:30:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_Kobo](https://avatars.discourse-cdn.com/v4/letter/_/f05b48/32.png) [@\_Kobo](https://forums.fusetools.com/u/_Kobo)\
**Post date:** [April 19, 2016, 5:30pm UTC](https://forums.fusetools.com/t/how-to-open-and-close-sidebar-programaticaly/3737/1 "2016-04-19T17:30:24Z")

</div>

Hi, i’m wondering how can i open and close a sidebar programmatically. the code for my sidebar is pretty much the same as social media example

---

<div class="post-metadata">

**Author:** ![Remi\_Pedersen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/remi_pedersen/32/432_2.png) [@Remi\_Pedersen](https://forums.fusetools.com/u/Remi_Pedersen)\
**Post date:** [April 19, 2016, 6:11pm UTC](https://forums.fusetools.com/t/how-to-open-and-close-sidebar-programaticaly/3737/2 "2016-04-19T18:11:47Z")

</div>

You can bind the `Active` property of the `EdgeNavigator` to an observable in JavaScript and then change the value of the observable in code.

In the case of the social media example this would look like:

ux:

```auto
<EdgeNavigator ux:Name="EdgeNavigator" Active="{activePage}">

```

JS:

```auto
activePage = Observable("");

function activateMenu(){
    activePage.value = "menu";
}

```

(you of course also have to add `activePage` and `activateMenu` to your module.exports).

To navigate away from the side menu you simply set activePage.value to something else (for instance an empty string)

---

<div class="post-metadata">

**Author:** ![\_Kobo](https://avatars.discourse-cdn.com/v4/letter/_/f05b48/32.png) [@\_Kobo](https://forums.fusetools.com/u/_Kobo)\
**Post date:** [April 22, 2016, 6:28am UTC](https://forums.fusetools.com/t/how-to-open-and-close-sidebar-programaticaly/3737/3 "2016-04-22T06:28:22Z")

</div>

navigation away from sidebar works but the sidebar doesnt close

EDIT: solved
