开发者

Jquery treeview collapse except of root

开发者 https://www.devze.com 2023-02-04 20:40 出处:网络
I used JQuery TreeView in large mode I want to collapse all items except of root how I can ch开发者_JAVA技巧ange jquery.treeview.js to do this ?well..not the cleanest solution maybe, but seems to work

I used JQuery TreeView in large mode I want to collapse all items except of root how I can ch开发者_JAVA技巧ange jquery.treeview.js to do this ?


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

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

greez ay


Just do the following, it must work:

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

精彩评论

暂无评论...
验证码 换一张
取 消