jsTree
来源:互联网 发布:自动卡密发卡平台源码 编辑:程序博客网 时间:2024/05/30 04:32
jsTree 绘制树形菜单,可以制作以下样式
需要引用文件 js包 css包
文档总结
文档对应代码包
示例代码:
使用本地的style.min.css 会报错,暂未解决,期待回复
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="js/jquery.min.js"></script> <script src="js/jstree.min.js"></script></head><!--使用本地css不显示图标,暂未解决--><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/jstree/3.3.3/themes/default/style.min.css" /><link rel="stylesheet" href="css/bootstrap.min.css"><body> <div id="container"> <ul> <li data-jstree='{"opened":true}'>Root node <ul> <li data-jstree='{"selected":true}'>b</li> <li>a</li> </ul> </li> </ul> </div> <script> (function($,undefined){ "use strict"; $.jstree.defaults.conditionalselect = function () { return true; }; $.jstree.plugins.conditionalselect = function (options, parent) { this.activate_node = function (obj, e) { if(this.settings.conditionalselect.call(this, this.get_node(obj))) { parent.activate_node.call(this, obj, e); } }; }; })(jQuery) $("#container").jstree({ "conditionalselect" : function (node) { return node.text === "Root node" ? false : true; }, "plugins" : ["conditionalselect"] }) </script></body></html>
阅读全文
0 0
- jstree
- JSTree
- jstree
- jstree
- JSTree
- jsTree
- jsTree操作
- jsTree刷新
- jsTree-随笔
- jstree学习
- JSTREE操作
- jstree实例
- jstree 操作
- jsTree是什么?
- Jstree Demo
- jstree刷新
- jstree使用
- JSTree使用指南
- eclipse使用码云上传代码和下载代码
- 网络编程
- C# Queue的使用
- 第三课:把tensorflow,模型和测试数据导入Android工程
- Activity的四种启动模式
- jsTree
- LeetCode之1-bit and 2-bit Characters(Kotlin)
- Android代码连接Wifi时被系统切换到其他Wifi的问题
- 怎样提高数据恢复的成功率
- 结构+算法
- 算法:连续邮资问题(回溯+动态规划+剪枝)
- 时序数据库(选摘)
- [BZOJ1050][HAOI2006]旅行comf(并查集)
- 找不到min和max标识符--C++中头文件次序问题