This example demonstrates how to create a basic menu using nothing but JavaScript. The Menu API also supports building a menu like this using existing markup.