我正在从 UL 加载树,在 Firefox 或 Chrome 中,页面刷新很好。但在 IE9 中,整个树在折叠回应有的状态之前会进行短暂(且丑陋)的扩展。这是十分之一秒或其他任何时间,但它是该项目的展示停止器。
任何有关如何防止这种行为的建议将不胜感激。文档类型 html 4.01。Jsquery 最小 1.7.2。杰树 1.0。代码如下。
$(function(){
$("#treeview").jstree({
"themes" : {
"theme" : "default",
"dots" : false,
"icons" : false
},
"ui" : {
"selected_parent_close" : "false",
"select_multiple_modifier" : "false",
"initially_select" : [$('body').attr('id')],
},
"core": {
"animation": 500
},
"cookies" : {
"save_selected" : false
},
"plugins" : [ "themes", "html_data", "ui", "cookies" ]
});
$("#treeview").bind("reselect.jstree", function () {
$("#treeview").bind("select_node.jstree", function (e, data) {
document.location = data.rslt.obj.children("a").attr("href");
});
});
$("#treeview").bind("loaded.jstree", function () {
$("#treeview").jstree("open_all", "#" + $('body').attr('id'));
});
});