new</span> hx.Menu(<span class="hljs-string">'#collapsibleMenu'</span>);
menu.renderer = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">element, item</span>)</span>{
  hx.select(element).text(item.text || item)
};
menu.render([
  {
    <span class="hljs-attr">text</span>: <span class="hljs-string">'Item 1'</span>,
    <span class="hljs-attr">children</span>: [
      <span class="hljs-string">'Sub item 1'</span>,
      <span class="hljs-string">'Sub item 2'</