title: Opening parents of a nested navigator
body: <p>I have a code for a navigator which I that works like an accordion.</p>
  
  <p>A picture to demonstrate my navigator:</p>
  
  <p><img src="https://i.stack.imgur.com/YNZcA.png" alt="enter image description here"></p>
  
  <p>Ignore the "wierd characters", this is my language.</p>
  
  <p>this is a code example of how it build:
  <a href="http://jsfiddle.net/uXA7E/3/" rel="nofollow noreferrer">http://jsfiddle.net/uXA7E/3/</a></p>
  
  <p>As you can see, the navigator is max 3 levels depth.</p>
  
  <p>What I'm trying to achieve is that if the user is browsing category with the id of "13" or so with jQuery I will pick the element with the <strong>class</strong> of 13, and then reveal all the way down to it and mark it in some color.</p>
  
  <p>this is how a link build:</p>
  
  <pre><code>&lt;a class="13" href="category.php?cid=13"&gt;בלוקים ודפדפות&lt;/a&gt;
  </code></pre>
  
  <p>I do have an element on the page that holds the ID that im viewing:</p>
  
  <pre><code>&lt;input type="hidden" value="13" id="cid"&gt;
  </code></pre>
  
  <p>This is the code that I tried:</p>
  
  <pre><code>var until = document.getElementsByClassName('depth-two');
  $("."+$("#cid").val()).prevUntil(until,"ul").show();
  </code></pre>
  
  <p>AND:</p>
  
  <pre><code>$("."+$("#cid").val()).prevAll("ul").show();
  </code></pre>
  
  <p>Unfortunately, it didn't work at all.</p>
  
  <p>Any other ideas?</p>