Open this page in the API Guide

MainMenu.toggle Method

Toggles the state of the menu.