问题
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