How do I dynamically show and hide an entire TabContainer using DOJO?

后端 未结 9 953
轮回少年
轮回少年 2021-01-05 02:06

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 fir

9条回答
  •  情深已故
    2021-01-05 03:07

    If you use dijit.byId("tabContainer").resize(); after you set the display to block it will bring back the tab headers.

    You'll save a little bit of javascript if you just use visibility: hidden; (although the tabContainer will still take up space on the page)

    Another alternative I use pretty frequently is instead of display: none/block; I use height: 0px/auto;

    You could also switch the position to absolute and set the coordinates for off screen somewhere too. That's require a lot more css changes than simply doing the height though. That's my preferred method if it works in my situation.

    Between these solutions hopefully one will work for you.

提交回复
热议问题