天天看点

noConflict

var $j = jQuery.noConflict();
         $j(document).ready(
              function() {
                  $.ajax({
                        type : "get",
                        async : false,
                        url : "<%=path%>/sys/authRolelist",    
                        dataType : "json",        
                        success : function(result){
                          ztree = $.fn.zTree.init($("#menuTree"), setting, result);
                         //展开所有节点
                         ztree.expandAll(true);
                         },
                         error: function(e){
                            console.log(e);
                         }
                         });
                    //勾选角色所拥有的菜单
                   var menuIds = menuIdList;
                 for(var i=0; i<menuIds.length; i++) {
                     var node = ztree.getNodeByParam("id", menuIds[i]);
                       ztree.checkNode(node, true, false);
                 } 
                 
              } 
         );