당신이 demo's를 보면 당신은 정확하게 당신이 예 4.
을 위해 필요한 참조 페이지에 다음을 추가한다 :
<div id="treecontrol">
<a title="Collapse the entire tree below" href="#"><img src="../images/minus.gif" /> Collapse All</a>
<a title="Expand the entire tree below" href="#"><img src="../images/plus.gif" /> Expand All</a>
<a title="Toggle the tree below, opening closed branches, closing open branches" href="#">Toggle All</a>
</div>
을 그리고 트리 컨트롤을 연결하면 'treecontrol'을 지정하십시오.
$("#black, #gray").treeview({
control: "#treecontrol"
});
경고하십시오
플러그인이 .eq()
을 사용하여 적절한 기능을 할당하므로 앵커 태그의 순서가 중요합니다.
$("a:eq(0)", control).click(handler(CLASSES.collapsable));
// click on second to expand tree
$("a:eq(1)", control).click(handler(CLASSES.expandable));
// click on third to toggle tree
$("a:eq(2)", control).click(handler());
[I 모든를 확장하고 jQuery를 트 리뷰 플러그인의 외부 모든 링크를 축소 만들기 어떻게?]의 (
가능한 중복 http://stackoverflow.com/questions/2603653/how-do-i-create-expand -all-and-collapse-all-links-outside-of-the-jquery-treeview) –