title: How to toggle (jQuery) with an anchor
body: <p>I have a small problem with jQuery.</p>
  <p>The situation:</p>
  <p>I have a piece of jQuery code, where I toggle results.</p>
  <p>JS Code:</p>
  <pre><code>//Set default open/close settings
  $('.acc_container').hide(); //Hide/close all containers
  //$('.acc_trigger:first').addClass('active').next().show(); //Add &quot;active&quot; class to first trigger, then show/open the immediate next container
  
  //On Click
  $('.acc_trigger').click(function(){
      if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
          $('.acc_trigger').removeClass('active').next().slideUp(); //Remove all .acc_trigger classes and slide up the immediate next container
          $(this).toggleClass('active').next().slideDown(); //Add .acc_trigger class to clicked trigger and slide down the immediate next container
      }
      return true; //Prevent the browser jump to the link anchor
  });
  </code></pre>
  <p>Now I want to open - toggle an item on anchor position from the URL like (<code>http://x.com/page.php#toggleItem2</code>)</p>
  <p>Question:
  How read <code>toggleItem2</code> from URL and open exactly this section?</p>
  <p>Additional:</p>
  <p>HTML Code:</p>
  <pre><code>&lt;div class=&quot;container&quot;&gt;
      &lt;h2 class=&quot;acc_trigger&quot;&gt;&lt;a href=&quot;#toggle1&quot;&gt;Item1&lt;/a&gt;&lt;/h2&gt;
      &lt;div class=&quot;acc_container&quot;&gt;
          &lt;div class=&quot;block&quot;&gt;
              Inner Text in toggle 1
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;h2 class=&quot;acc_trigger&quot;&gt;&lt;a href=&quot;#toggle2&quot;&gt;Item2&lt;/a&gt;&lt;/h2&gt;
      &lt;div class=&quot;acc_container&quot;&gt;
          &lt;div class=&quot;block&quot;&gt;
              Inner Text in toggle 2
          &lt;/div&gt;
      &lt;/div&gt;
  
  
      &lt;h2 class=&quot;acc_trigger&quot;&gt;&lt;a href=&quot;#toggle3&quot;&gt;Item3&lt;/a&gt;&lt;/h2&gt;
      &lt;div class=&quot;acc_container&quot;&gt;
          &lt;div class=&quot;block&quot;&gt;
              Inner Text in toggle 3
          &lt;/div&gt;
      &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  <p>I hope the problem is clearly defined.</p>