mos*_*oss 7 browser ajax jquery rendering jstree
我正在使用jsTree(1.0-rc3)和AJAX加载数据的选项,我有一个加载约2000个子节点的问题.虽然服务器在几秒钟内响应,但只需要大约40秒的jsTree来在浏览器中呈现结果(chrome,FF).除此之外,FF从'jquery-1.7.2.min.js'返回没有响应的信息.相同数量的数据冻结了IE.它是否超载了数据?还是某种bug?是否有任何可变因素,可以帮助我更快地渲染?
jQuery( "#dependency-tree" ).jstree(
{
'plugins':['themes', 'json_data', 'ui', 'core', 'types', 'sort'],
"json_data":{
"progressive_render": true,
"data":initData,
cache:false,
"ajax":{
"url":function ( node )
{
return appContext + 'GetUnitsNode/'
+ node.attr( 'id' );
},
dataType:"text",
"success":function ( data )
{
if ( data == "none" )
{
return false;
}
return jQuery.parseJSON( data );
}
}
},
"ui":{
'select_limit':1
},
"core":{
'animation':0,
'html_titles':true
},
"themes":{
"theme":"rules",
"dots":true,
"icons":true
},
"types":{
"types":{
"default":{
"icon":{
"image":appContext + "/img/orange.png"
}
}
}
},
"sort":function ( a, b )
{
return this.get_text( a ).toUpperCase() > this.get_text( b ).toUpperCase() ? 1 : -1;
}
} ).bind( "select_node.jstree", function ( event, data )
{
submitedNodeId = data.rslt.obj.attr( 'id' );
submitedNodeTypeId = data.rslt.obj.attr( "typeId" );
submitedNodeLast = data.inst.is_leaf( data.rslt.obj );
g_node_text = jQuery( data.rslt.obj ).children().eq(1).html();
} );
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3898 次 |
| 最近记录: |