I am trying to make a button/hyperlink, that is able to hide and show my navigation bar. At first it is hidden and when I click on the a-element it changes the style and is visible. But it won't hide it again on the second click.
The hyperlink will be visible if `min-width: 480` is false (only for mobiles and small browser windows).

I tried to change the `onClick` value via javascript. I will show it below.

```html
  <script type="text/javascript">
   function showNavBar() {
    document.getElementById("navigationBar").style.display = "block";
    document.getElementById("navigationBar").onClick = function() { hideNavBar(); };
   }
   function hideNavBar() {
    document.getElementById("navigationBar").style.display = "none";
    document.getElementById("navigationBar").onClick = function() { showNavBar(); };
   }
  </script>
...
  <a  href="javascript:void(0);" onclick="showNavBar();" class="mobileShow">MenuButton</a>

  <nav id="navigationBar" class="main"> <!-- begin navigation bar -->
   <ul id="navigationList" class="icon-list">
    <li>
     <a href="">
      <span class="nav-icon">
       <i aria-hidden="true" id="icon-menu" class="nav-icon"></i>
      </span>
      <span>Menu</span>
     </a>
    </li>
    <li>
     <a href="">
      <span class="nav-icon">
       <i aria-hidden="true" id="icon-highscore" class="nav-icon"></i>
      </span>
      <span>Highscore</span>
     </a>
    </li>
    <li>
     <a href="">
      <span class="nav-icon">
       <i aria-hidden="true" id="icon-facebook" class="nav-icon"></i>
      </span>
      <span>Facebook</span>
     </a>
    </li>
    <li>
     <a href="">
      <span class="nav-icon">
       <i aria-hidden="true" id="icon-legalnotice" class="nav-icon"></i>
      </span>
      <span>Legal Notice</span>
     </a>
    </li>   
   </ul>
  </nav> <!-- end navigation bar -->
  <section class="main">
          ...
  </section>
 </body>
</html>
```

I also tried similar stuff with `setAttribute()` and using the href attribute to call the functions with the same result.
I don't understand why it doesn't work after the `onClick` value is changed one time. I am desperate for help.

Cheers.