Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think you are looking for the <code>persist</code> option. You can view the documentation on what options are available here <a href="http://docs.jquery.com/Plugins/Treeview/treeview#options" rel="nofollow">http://docs.jquery.com/Plugins/Treeview/treeview#options</a></p> <p><em>Example</em></p> <pre><code>$(".selector").treeview({ persist: "cookie", cookieId: "navigationtree" }) </code></pre> <p><em>Update</em></p> <p>The example code that they use for cookie based persistence which works on the demo page - <a href="http://jquery.bassistance.de/treeview/demo/" rel="nofollow">sample 3</a> (the location based is sample 2 and it doesn't seem to work) is as follows:</p> <p><strong>Javascript</strong></p> <pre><code>&lt;script type="text/javascript"&gt; jQuery(document).ready(function() { $('#page_tree').treeview({ collapsed: true, persist: cookie }) }) &lt;/script&gt; </code></pre> <p><strong>HTML</strong></p> <pre><code>&lt;ul id="page_tree"&gt; &lt;% @pages.each do |page| %&gt; &lt;li id="title"&gt;&lt;span&gt; &lt;%= page.name %&gt; &lt;/span&gt; &lt;ul&gt; &lt;li&gt; &lt;%= link_to "#{page.title}" %&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;% end %&gt; &lt;/ul&gt; </code></pre> <p>My only other advice would be, if this does not work, try statically linking to the javascript/css files and see if that works, also you will want to use the <code>cookie.js</code> script.</p> <pre><code>&lt;link rel="stylesheet" href="http://jquery.bassistance.de/treeview/jquery.treeview.css" /&gt; &lt;script type="text/javascript" src="http://jquery.bassistance.de/treeview/jquery.treeview.js" &gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://jquery.bassistance.de/treeview/lib/jquery.cookie.js"&gt;&lt;/script&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload