Easyui 异步树直接所有展开

初始化异步树直接所有展开代码:

    $(function(){
	$('#tt').tree({
	    url:'<%=request.getContextPath()%>/treeInit',
	    lines:true,
     	    onLoadSuccess:function(node,data){
	         var t = $(this);
   		 if(data){
		     $(data).each(function(index,d){
			if(this.state == 'closed'){
			    t.tree('expandAll');
			}
		     });
		}
	    }
	});
    });


posted @ 2015-04-03 09:33  phlsheji  阅读(289)  评论(0编辑  收藏  举报