title: Expanding a hidden div by referring with an anchor from external page
body: <p>I have a script which hides (display:none) certain divs in the list on page load. Div contents represents description of a book, and the whole list is some sort of bibliography.  Every div has an id, for example, "div1", "div2" etc. </p>
  
  <pre><code>&lt;ul&gt;  
  &lt;li&gt;&lt;div class="hidden" id="div1"&gt;&lt;/li&gt;  
  &lt;li&gt;&lt;div class="hidden" id="div1"&gt;&lt;/li&gt;   
  ...  
  &lt;/ul&gt; 
  </code></pre>
  
  <p>And there's another page with a menu, which consists of anchored links to every such a div:</p>
  
  <pre><code>&lt;ul&gt;  
  &lt;li&gt;&lt;a href="bibl.html#div1"&gt;&lt;/li&gt;  
  &lt;li&gt;&lt;a href="bibl.html#div2"&gt;&lt;/li&gt;  
  ...  
  &lt;/ul&gt;  
  </code></pre>
  
  <p>I want the hidden div to autoexpand when the link on another page is clicked. I tried some window.location.href stuff, but to no avail - my JS is weak yet. As I understand the logic it should take the current url and check it for "#", then search for an element with the part to the right in the id attribute. Thanks a lot kind people.)</p>