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 name of the cookie to save opened nodes in. If set to false
- opened nodes won't be saved.
The name of the cookie to save selected nodes in. If set to false
- selected nodes won't be saved.
If set to true
jstree will automatically update the cookies every time a change in the state occurs.
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.
Go ahead and make changes to the tree and then refresh this page.
1 | $( function () { |
2 | $( "#demo1" ).jstree({ |
3 | "plugins" : [ "themes" , "html_data" , "ui" , "cookies" ] |
4 | }); |
5 | }); |
Save the current state.
string
event
Used internally with the auto_save
option. Do not set this manually.