kamiar3001
kamiar3001

Reputation: 2676

Jquery treeview collapse except of root

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 ?

Upvotes: 1

Views: 5132

Answers (2)

Bade Lal
Bade Lal

Reputation: 101

Just do the following, it must work:

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

Upvotes: 0

memyselfandi
memyselfandi

Reputation: 56

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

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

greez ay

Upvotes: 4

Related Questions