Loading ...
Sorry, an error occurred while loading the content.
 

Re: [ydn-javascript] How can I add submenu after construction?

Expand Messages
  • Todd Kloots
    Taka - You can add a submenu to a MenuItem instance via its submenu configuration property: item.cfg.addProperty( submenu , [YOUR MENU HERE]);
    Message 1 of 3 , May 29, 2007
      Taka -

      You can add a submenu to a MenuItem instance via its "submenu"
      configuration property:

      item.cfg.addProperty("submenu", [YOUR MENU HERE]);

      http://developer.yahoo.com/yui/docs/YAHOO.widget.MenuItem.html#submenu

      - Todd

      Taka wrote:
      > Hi Guys,
      >
      > YAHOO.widget.Menu :
      >
      > How can I add a sub menu after constructing yui menu object or rendering?
      >
      > What I want to do is:
      >
      > var oMenu = YAHOO.widget.Menu ( "menu" );
      > oMenu.addItems( aItems1 );
      > oMenu.render(document.body);
      > vat item = oMenu.getItem( 0, 0 );
      >
      > item.addSubMenu( aItems2 ); <-- something like this. :-)
      >
      > In yui menu, addItems() is very slow, so I want to add sub menus gradually.
      >
      > Best regards,
      >
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.