title: How to retain Javascript state on page change
body: <p>I have an accordion style navigation list set up so that when categories are clicked it opens up to show sub-categories that link to pages.</p>
  
  <p>What I would like to do is have the accordion navigation list keep it's open or closed state when the new page opens.</p>
  
  <p>I've gathered that cookies work to retain the state on refresh, but how do I retain the state when a different page is visited? All the pages have the same accordion navigation list.</p>