树形插件
dependenciesa tree plugin
examplesjquery 1.7 +
<script src="jquery-1.11.2.min.js"></script>
<script src="jquery.treeview.js"></script>
<script type="text/javascript">
var opt = {
data : {
name:'1',
children: [
{
name:'11',
children: [
{
name:'111',
},
{
name: '112'
}
]
},
{
name:'13',
}
]
},
/**
* click envent handler
* @param: {
* jqdom: the click taget ,
* name: the text,
* id: dom id,
* status: Expand or close
* }
*/
onClick: function(jqdom, name, id, status) {
console.log(jqdom);
console.log(name);
console.log(id);
console.log(status);
},
/**
* click envent handler
* @param: {
* jqdom: the click taget ,
* name: the text,
* children: the data under the target
* }
*/
onDel: function(jqdom, name, children){
console.log(jqdom);
console.log(name);
console.log(children);
}
}
$("body").treeView(opt);
</script>
click me to view the example.
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。