Attempting to work towards a dynamic accordion menu in a dynamic layout. Running startup() on the top level container, which IIRC is per the docs, the accordion does not initialize, that is only the first pane is displayed. Not running startup on the top level container initializes the accordion (though it seems wonky) but does not initialize the layout. All dynamic code removed to demonstrate the problem. Thanks for any ideas.
<!DOCTYPE html>
<html >
<head>
<link rel="stylesheet" href="css/style4.css" media="screen">
<script>dojoConfig = {parseOnLoad: true}</script>
<script src="dojo.1.9.3/dojo/dojo.js"> </script>
<script>
require([
"dijit/layout/BorderContainer",
"dijit/layout/ContentPane",
"dijit/layout/TabContainer",
"dijit/layout/AccordionContainer",
"dijit/layout/AccordionPane",
"dojo/domReady!"
], function(BorderContainer, ContentPane, TabContainer, AccordionContainer, AccordionPane){
var bc = new BorderContainer({style: "height: 600px; width: 800px;"});
var cp1 = new ContentPane({
region: "left",
style: "height: 400px",
content: "hello world"
});
bc.addChild(cp1);
var cp2 = new ContentPane({
region: "center",
style: "height: 400px",
});
var aContainer = new AccordionContainer();
aContainer.addChild(new AccordionPane({
title: "number one",
content: "Hello world"
}));
aContainer.addChild(new AccordionPane({
title: "number two",
content: "Hello Goodbye"
}));
cp2.addChild(aContainer);
bc.addChild(cp2);
document.body.appendChild(bc.domNode);
bc.startup();
//cp2.startup();
});
</script>
</head>
<body class="claro">
</body>
</html>