title: Programmatically Add a new Dojo AccordionPane to Existing AccordionContainer
body: <p>I am trying to add a new AccordionPane to a existing container, but for the life of me I can't get it to work.  </p>
  
  <p>Is anyone able to suggest where I am going wrong?</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js" djConfig="parseOnLoad: true"&gt;  &lt;/script&gt;  
  
          &lt;script type="text/javascript"&gt;  
              dojo.require("dijit.layout.ContentPane"); 
              dojo.require("dijit.layout.AccordionContainer");
          &lt;/script&gt;
  
          &lt;link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.4.0/dijit/themes/tundra/tundra.css"&gt; 
  
          &lt;script type="text/javascript"&gt;
              function AddNewPane() {
                  var accordPane = new dijit.layout.AccordionPane({"title": "test", "content":"hello"});
                  dijit.layout.AccordionContainer("myacc").addChild(accordPane);
                  accordPane.startup();
                  //select the new Pane
                  accordPane.selected = true;
              }      
          &lt;/script&gt;
  
      &lt;/head&gt;
  
      &lt;body&gt;
          &lt;button type="button" onclick="AddNewPane();" &gt;Add&lt;/button&gt;
  
          &lt;div dojoType="dijit.layout.AccordionContainer" id="myacc" class="tundra" &gt;
              &lt;div dojoType="dijit.layout.AccordionPane" title="Origional Acc 1" &gt;
                  Testing One
              &lt;/div&gt;
                  &lt;div dojoType="dijit.layout.AccordionPane" title="Origional Acc 2" &gt;
                  Testing Two
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;script&gt;
              document.getElementById("myacc").style.width = '200px';
              document.getElementById("myacc").style.height = '200px';
          &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>