天天看點

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);
                 } 
                 
              } 
         );