jqTree - css在树中显示虚线

时间:2012-05-22 23:40:04

标签: css treeview

有没有人有一些css样式和图像应用于jqTree来显示树的轮廓?像YUI树视图那样显示虚线边框

http://developer.yahoo.com/yui/examples/treeview/default_tree.html

1 个答案:

答案 0 :(得分:0)

原来YUI treeview允许您使用现有的html进行渲染。

    <script src="scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="scripts/tree.jquery.js" type="text/javascript"></script>    

    <!-- Required CSS -->
    <link type="text/css" rel="stylesheet" href="http://yui.yahooapis.com/2.9.0/build/treeview/assets/skins/sam/treeview.css">

    <!-- Dependency source file --> 
    <script src="http://yui.yahooapis.com/2.9.0/build/yahoo-dom-event/yahoo-dom-event.js" ></script>
    <!-- Optional dependency source file to decode contents of yuiConfig markup attribute--> 
    <script src="http://yui.yahooapis.com/2.9.0/build/json/json-min.js" ></script>

<!-- TreeView source file --> 
<script src="http://yui.yahooapis.com/2.9.0/build/treeview/treeview-min.js" ></script>

<script>
      var tree;
        function treeInit() {
            tree = new YAHOO.widget.TreeView("committeeTree");
            // if required, add nodes here
            tree.render();
        }

        $(function () {
              $("#myTree").tree({
                    data: source
                });

              treeInit();

        });

</script>