• Ztree树使用详解


    zTree自定义节点name显示样式

    //setting中配置属性
      view: {  
                showLine:false,
                dblClickExpand: true,
                showIcon: false,
                addDiyDom: addDiyDom  //自定义
            }
    
        //添加自定义样式函数
        function addDiyDom(treeId, treeNode) {
                var spaceWidth = 5;
                var switchObj = $("#" + treeNode.tId + "_switch"),
                checkObj = $("#" + treeNode.tId + "_check"),
                icoObj = $("#" + treeNode.tId + "_ico");
                switchObj.remove();
                checkObj.remove();
                icoObj.parent().before(switchObj);
                icoObj.parent().before(checkObj);
    
                var spantxt = $("#" + treeNode.tId + "_span").html();
                if (spantxt.length > 17) {
                    spantxt = spantxt.substring(0, 15) + "..."; //最多显示15个字
                    $("#" + treeNode.tId + "_span").html(spantxt);
                }
           }

    收录详解地址:

    http://www.360doc.com/content/19/0523/11/19913882_837657547.shtml

  • 相关阅读:
    51nod——T1267 4个数和为0
    cf220B莫队
    cf220b
    poj1436水平可见线
    poj2528贴海报,,
    poj3468
    hdu1698
    ural1989 单点更新+字符串hash
    cf Queries on a String
    hdu4605
  • 原文地址:https://www.cnblogs.com/BluceLee/p/15063063.html
Copyright © 2020-2023  润新知