DOJO seems to have some quirks here. I specifically need to have the TabContainer hidden when the page loads, but then become visible after the user clicks a button. The first thing I tried is setting style.display = "none" to start, and then setting style.display = "block" on the click event. Unfortunately, this only partially works- the page will render an invisible box in the right location/dimensions, but not render the actual contents. The box's contents only get rendered when triggered by something else (for example, going to a different FF tab or suspending/resuming firebug will make the box render).
If the style.display property is set to be visible on page load, everything works fine. You can toggle the display property and it shows or hides the tabcontainer properly. But if it's set to "none" on page load, it screws up.
Some stripped sample code:
var tabContainer = dojo.byId('tabContainer');
tabContainer.style.display = 'block';
How can I dynamically show/hide a TabContainer without having it start in the shown state?
以上就是How do I dynamically show and hide an entire TabContainer using DOJO?的详细内容，更多请关注web前端其它相关文章！