title: How to implement two level sidebar navigation with Jquery Mobile
body: <p>I'd like to implement a two level navigation inside a sidebar using JQuery Mobile.</p>
  
  <p>By means of explaining what I am trying to achieve, consider I have 3 categories links, and (for example) 3 links in each category</p>
  
  <p>Category 1
    - Link 1
    - Link 2
    - Link 3</p>
  
  <p>Category 2
    - Link 1
    - Link 2
    - Link 3</p>
  
  <p>Category 3
    - Link 1
    - Link 2
    - Link 3</p>
  
  <p>And would like someway to avoid having the user have to browse down two links to try to get to any one page.</p>
  
  <p>I've tried a few avenues using the  route;</p>
  
  <ol>
  <li><p>Using data-role="collapsible", in an attempt to create headers for each category in the sidebar, any of which users could expand to click on the second level link</p></li>
  <li><p>Using a series of select drop downs (for each category), and javascript to fire a page change on selecting any of the choices</p></li>
  </ol>
  
  <p>The problem is that while both methods work nicely when used in a 'main content' page, as soon as I put them in a content-secondary container, neither of them work (the collapsible content is always expanded, and the javascript does not seem to fire)</p>
  
  <p>Can anyone suggest either (a) a solution to the above problems I am having, or (b) an alternative way to skin this cat?</p>
  
  <p>Edit:
  You can see my earlier post trying to sort out the collpasible problem inside the secondary block at;
  <a href="https://stackoverflow.com/questions/10067501/is-it-possible-to-have-collapsible-content-inside-a-secondary-div-class-with-jqu">Is it possible to have collapsible content inside a secondary div class with JQuery Mobile?</a></p>
  
  <p>And a JSFiddle with sample code at <a href="http://jsfiddle.net/vinomarky/xfcdF/" rel="nofollow noreferrer">http://jsfiddle.net/vinomarky/xfcdF/</a> , although Fiddle doesnt seem to work with secondary divs, so it will not render the sidebar correctly even if you expand the window</p>