2

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

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

4

1 回答 1

0

原来 YUI 树视图允许您使用现有的 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>
于 2012-05-23T17:51:39.147 回答