实用Bootstrap树形菜单特效插件Bootstrap Tree View,非常不错的Bootstrap插件,现在很多
Bootstrap制作的页面都需要此功能,此插件需要Bootstrap3版本以及jQuery 2.0极以上版本支
持,支持众多参数自定义功能,颜色、背景色、图标、链接等,还是很不错的,推荐使用,
使用方法:
1.加载插件、Bootstrap、jQuery
<!-- Required Stylesheets --> <link href="./css/bootstrap.css" rel="stylesheet"> <!-- Required Javascript --> <script src="./js/jquery.js"></script> <script src="./js/bootstrap-treeview.js"></script>
2.HTML内容
<div id="tree"></div>
3.函数调用
function getTree() { // Some logic to retrieve, or generate tree structure return data; } $('#tree').treeview({data: getTree()});