       }
          );
      };

      function toggleMenu() {
          // set timeout so that the panel has a chance to roll up
          // before the menu switches states
          if (menu.classList.contains(&#x27;open&#x27;)) {
              menu.classList.add(&#x27;closing&#x27;);
              rollBack &#x3D; setTimeout(toggleHorizontal, 500);
          }
          else {
              if (menu.classList.contains(&#x27;closing&#x27;)) {
                  clearTimeout(rollBack);
              } else {