Fork me on GitHub

Dropdown

<nav class="navbar navbar-default">
  <div class="container-fluid">
    <div class="navbar-collapse">
      <ul class="nav navbar-nav">
        <li id="myDropdown" class="dropdown">
          <a id="myTrigger" href="#" class="dropdown-toggle">Dropdown <b class="caret"></b></a>
          <ul class="dropdown-menu" style="padding: 8px">
            I only close on escape
          </ul>
        </li>
      </ul>
    </div>
  </div>
</nav>
YUI().use(
  'aui-dropdown',
  function(Y) {
    new Y.Dropdown(
      {
        boundingBox: '#myDropdown',
        trigger: '#myTrigger',
        hideOnClickOutSide: false,
        hideOnEsc: true,
        open: true
      }
    ).render();
  }
);