Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/415.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Fancytree不可见,隐藏了类ui帮助程序_Javascript_Jquery_Fancytree - Fatal编程技术网

Javascript Fancytree不可见,隐藏了类ui帮助程序

Javascript Fancytree不可见,隐藏了类ui帮助程序,javascript,jquery,fancytree,Javascript,Jquery,Fancytree,我刚刚开始使用fancytree 2.6.0,我正在通过web服务请求填充它 我的问题是,所有节点都存在,但ui帮助程序隐藏类使其不可见。我已经临时修复了:$(rootNode.ul).removeClass('ui-helper-hidden');但我肯定我错过了什么 脚本和css: <link href="Scripts/jquery-plugins/fancytree-2.6.0/src/skin-themeroller/ui.fancytree.css" rel="styleshe

我刚刚开始使用fancytree 2.6.0,我正在通过web服务请求填充它

我的问题是,所有节点都存在,但ui帮助程序隐藏类使其不可见。我已经临时修复了:$(rootNode.ul).removeClass('ui-helper-hidden');但我肯定我错过了什么

脚本和css:

<link href="Scripts/jquery-plugins/fancytree-2.6.0/src/skin-themeroller/ui.fancytree.css" rel="stylesheet" type="text/css" />
<script src="Scripts/jquery-1.11.1/jquery-1.11.1.js" type="text/javascript"></script>
<script src="Scripts/jquery-1.11.1/jquery-migrate-1.2.1.js" type="text/javascript"></script>
<script src="Scripts/jquery-ui-1.11.2/jquery-ui.js" type="text/javascript"></script>
<script src="Scripts/jquery-plugins/fancytree-2.6.0/src/jquery.fancytree.js" type="text/javascript"> </script>
<script src="Scripts/jquery-plugins/fancytree-2.6.0/src/jquery.fancytree.themeroller.js" type="text/javascript"> </script>
生成的html:

<div class="grid_13 alpha omega" id="selectedClausesDiv">
    <ul class="ui-fancytree fancytree-container ui-fancytree-source ui-helper-hidden" tabindex="0">
        <li class="">
            <span class="fancytree-node fancytree-folder fancytree-exp-n fancytree-ico-cf">
                <span class="fancytree-expander"/>
                <span class="fancytree-icon"/>
                <span title="This folder and all child nodes were added programmatically." class="fancytree-title">P&amp;I Owned</span>
            </span>
        </li>
        <li class="fancytree-lastsib">
            <span class="fancytree-node fancytree-folder fancytree-lastsib fancytree-exp-nl fancytree-ico-cf">
                <span class="fancytree-expander"/>
                <span class="fancytree-icon"/>
                <span title="This folder and all child nodes were added programmatically." class="fancytree-title">P&amp;I Extended Cargo</span>
            </span>
        </li>
    </ul>
</div>

  • 宝洁;我拥有
  • 宝洁;我延期交货

如果没有提供数据源,Fancytree将自动隐藏根元素

如果使用API添加数据而没有初始源,则提供空白的
source
选项将防止Fancytree隐藏根元素

$("#tree").fancytree({
    source: []
});
$("#tree").fancytree({
    source: []
});