dwzjs在firefox下遇到页面加载问题解决方法
正常情况下:
之所以出现上面的情况是因为dwz.frag.xml为加载完就实行了菜单加载,具体看代码:
问题代码:
$(document).ready(function(){
DWZ.init("__PUBLIC__/dwz/dwz.frag.xml", {
loginUrl:"login.html",
debug:false,
statusCode:{ok:1,error:0},
callback:function(){
initEnv();
$("#themeList").theme({themeBase:"__PUBLIC__/dwz/themes"});
}
});
$("#sidebar").loadUrl("__APP__/Public/menu");
});
修改成如下代码就解决啦:
$(document).ready(function(){
DWZ.init("__PUBLIC__/dwz/dwz.frag.xml", {
loginUrl:"login.html",
debug:false,
statusCode:{ok:1,error:0},
callback:function(){
initEnv();
$("#themeList").theme({themeBase:"__PUBLIC__/dwz/themes"});
$("#sidebar").loadUrl("__APP__/Public/menu");
}
});
});