Jquery treeview collapse except of root

◇◆丶佛笑我妖孽 提交于 2019-12-24 07:03:22

问题


I used JQuery TreeView in large mode I want to collapse all items except of root how I can change jquery.treeview.js to do this ?


回答1:


well..not the cleanest solution maybe, but seems to work:

$("#navigation").treeview({collapsed:true}).find('div.hitarea:first').click();

greez ay




回答2:


Just do the following, it must work:

$("#navigation").treeview({
  collapsed: true,
  unique: true,
  "expanded": true,
  persist: "location"
})
.find('div.hitarea:first')
.click();


来源:https://stackoverflow.com/questions/4711174/jquery-treeview-collapse-except-of-root

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!