Module: elements-sk/nav-button-sk


Allows for the creation of a pop-up menu. The actual menu is contained in a sibling element.

nav-button-sk is just a convenience that contains the hamburger menu and toggles the shown property of a sibling 'nav-links-sk'. Other types of popup menus can be created using buttons and icons directly. The children of 'nav-links-sk' do not have to be links, they could be other elements, such as buttons.

// Using nav-button-sk:
<nav-links-sk shown>
  <a href="">Main</a>
  <a href="">Triage</a>
  <a href="">Alerts</a>

// Using a button instead of nav-button-sk:
<button onclick="this.nextElementSibling.shown = true;">
  <a href="">New A</a>
  <a href="">New B</a>
  <a href="">New C</a>

Documentation generated by JSDoc 3.6.4 on Thu May 14 2020 09:14:16 GMT-0400 (Eastern Daylight Time)