function toggleButton( evt ){

    target = evt.target;
    while ( target && !target.getAttribute( toggleMethod ) ){
      target = target.parentNode;
      if(!target) { return; }
    }

    currentState = target.getAttribute( menuState ) === isOpen ? isClosed : isOpen;

    target.setAttribute(menuState, currentState);

  }
The open/close action is performed by toggling an attribute
on the menu main element.

First, check if the target is the menu itself. If it's a child
keep walking up the tree until we found the main element
where we can toggle the state.