首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

jQuery插件TreeView默许展开第一层

2012-10-24 
jQuery插件TreeView默认展开第一层后台代码添加children属性:?var branch $(ul/).appendTo(current)

jQuery插件TreeView默认展开第一层

后台代码添加children属性:

?

var branch = $("<ul/>").appendTo(current);if(!this.isroot){                        //在后台添加isroot属性,根节点不需要执行下面的代码,否则重复点击不加载数据,   if (this.hasChildren) { current.addClass("hasChildren"); createNode.call({text:"placeholder",id:"placeholder",children:[] }, branch);   }}
??

?

?

热点排行