I am trying to implement the (horizontal) dynamic menu from the JavaScript Anthology book but it does not seem to work if I create the menu dynamically.

I am creating the UL and LI elements in exactly the same way as in the static example (I can verify that by inspecting the DOM) but dynamically since I am receiving the menu from the server (I am building an Ajax application). The root level does show and the highlighting works but the submenu arrows and the submenus themselves do not appear.

Can anyone shed any light on this?

Or alternatively, point me to alternatives. I am building an Ajax application that somewhat mimics a windows desktop application.