You are browsing the old site - check the new version out

back to the documentation homepage

jsTree v.1.0

cookies plugin


The cookies enables jstree to save the state of the tree across sessions. What this does is save the opened and selected nodes in a cookie, and reopen & reselect them the next time the user loads the tree. Depends on the jQuery.cookie plugin.

The nodes need to have IDs for this plugin to work.



A string (or false). Default is "jstree_open".

The name of the cookie to save opened nodes in. If set to false - opened nodes won't be saved.


A string (or false). Default is "jstree_select".

The name of the cookie to save selected nodes in. If set to false - selected nodes won't be saved.


A Boolean. Default is true.

If set to true jstree will automatically update the cookies every time a change in the state occurs.


An object. Default is {}.

The options accepted by the jQuery.cookie plugin.


Check your data plugin documentation (html_data, xml_data, json_data) or take a close look at these examples for information on how to specify multilanguage nodes.

Using the cookies plugin

Go ahead and make changes to the tree and then refresh this page.


Save the current state.

  • string event

    Used internally with the auto_save option. Do not set this manually.