当前位置: 代码迷 >> JavaScript >> easyui tree怎么实现同一时间只展开一个目录
  详细解决方案

easyui tree怎么实现同一时间只展开一个目录

热度:298   发布时间:2013-11-15 22:28:15.0
easyui tree如何实现同一时间只展开一个目录
本帖最后由 geyuliu 于 2013-11-13 21:59:03 编辑
因项目开发需要,要实现easyui tree在同一时间只展开一个目录,其他的目录则处理收缩状态,求高人指点!

------解决方案--------------------


<ul class="easyui-tree">
        <li>
            <span>My Documents</span>
            <ul>
                <li data-options="state:'closed'">
                    <span>Photos</span>
                    <ul>
                        <li>
                            <span>Friend</span>
                        </li>
                        <li>
                            <span>Wife</span>
                        </li>
                        <li>
                            <span>Company</span>
                        </li>
                    </ul>
                </li>
                <li>
                    <span>Program Files</span>
                    <ul>
                        <li>Intel</li>
                        <li>Java</li>
                        <li>Microsoft Office</li>
                        <li>Games</li>
                    </ul>
                </li>
                <li>index.html</li>
                <li>about.html</li>
                <li>welcome.html</li>
            </ul>
        </li>
    </ul>



data-options="state:'closed'"   关闭
  相关解决方案