Sara Trice
Just a programmin', bellydancin', cake bakin' kinda girl

  • RSS-Feed posts
  • RSS-Feed comments

  • gallery
  • livejournal
  • résumé
  • website portfolio

Pages

  • gallery
  • livejournal
  • résumé
  • website portfolio

Fun Stuff

  • My Amazon Wish List

Webcomics

  • Dark Legacy Comics
  • Erfworld
  • Questionable Content

New Posts

  • Indexing users that belong to groups with ancestry and thinking sphinx
  • Avoiding Ruby hash conditionals in Ruby on Rails
  • Quickie: How to add a blank option to options_from_collection_for_select
  • Using javan/whenever on Engine Yard Cloud
  • Illinois Home Bakeries – for farmer’s markets only

Latest Comments

  • 08.05 | Marc-André Lafortune in Testing CKEditor in Ruby on Rails with Cucumber/Ca…
  • 01.05 | Charles in ImageMagick: "convert: color profile operates on a…
  • 25.02 | Stanislaw in Testing CKEditor in Ruby on Rails with Cucumber/Ca…
  • 24.02 | admin in Avoiding Ruby hash conditionals in Ruby on Rails
  • 24.02 | Pam in Avoiding Ruby hash conditionals in Ruby on Rails
May 2011
S M T W T F S
« Apr   Sep »
1234567
891011121314
15161718192021
22232425262728
293031  
4
May

jsTree: adding Expand All and Collapse All buttons

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.

by admin in tech
1 comment

Meta

  • Log in
© 2008 - 2012
Design & CSS by
Freizeitler

Blogroll

    Dark Legacy Comics Yay MMORPGs!
    Erfworld Rob Balder writes this
    My Amazon Wish List Buy me somethin’!
    Questionable Content Am I more like Faye or Dora?