开发者

Dojo layout rendering problem

Press F5 in this example: DojoToolkit.

First the content is shown, and after that the layout gets into it's final state. In my application I want the opposite, so that the layout gets rendered, and after that the content is displayed. I don't want that 'jumping' phenomenon when loading. Is it possible to fix this someho开发者_JS百科w?


No, I don't think that there is such an option. Anyway, you could use a container div (with all the dojo layout elements in it) with initial state visbility:hidden, and after the page is loaded and parsed change it's visibility to "visible".

    <div id="container" style="visibility:hidden">
      <!-- dijit widgets inside the "container"-->
    </div>

   <script type="text/javascript">
      dojo.ready(function(){
        dojo.style("container:, "visibility", "visible");
      });
   </script>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜