You are viewing dement1a

Previous Entry | Next Entry

Luke and Sara

Originally published at Sara Trice. You can comment here or there.

The documentation for jsTree is thorough, but not particularly easy to read. If you are looking for an easy way to add “Expand All” and “Collapse All” buttons, here’s one way:

<input type="button" value="Collapse All" onclick="$('#tree_container_id').jstree('close_all');">
<input type="button" value="Expand All" onclick="$('#tree_container_id').jstree('open_all');">

where ‘#tree_container_id’ is, of course, the ID of the container node for your tree.

Latest Month

September 2011
S M T W T F S
    123
45678910
11121314151617
18192021222324
252627282930 
Powered by LiveJournal.com
Designed by Tiffany Chow