Whats the best way to programatically open a pane inside Dijit AccordionContainer

两盒软妹~` 提交于 2019-12-04 19:21:01

You can do it like this:

accordionContainer.selectChild( accordPane2 );

Assuming you are using dojo 1.3.

dijit.layout.AccordionContainer is a subclass of dijit.layout.StackContainer, which has selectChild defined.

I set up a demo page where you can see this code in action

If you were calling selectChild before startup, that could cause the error you were seeing since the widget wasn't in a 'complete' state. (Sorry, missed the commneted out code before I posted original answer)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!