add a toggle submenu navigation function