title: Open JQuery accordion when link with an id of element within the accordion is clicked
body: <p>Here is my issue <a href="http://jsfiddle.net/uJ3W5/12/" rel="nofollow">http://jsfiddle.net/uJ3W5/12/</a></p>
  
  <p>As you can see the 4 buttons at the top link to elements within section 1 of the accordion. However when the accordion is closed these links do not work.</p>
  
  <p>I need it so that when you click the links, the accordion opens and the page scrolls to the relevant section, and I'm a bit stumped.</p>
  
  <p>Thanks so much!</p>
  
  <p>My HTML:</p>
  
  <pre><code>&lt;head&gt;
    &lt;title&gt;jQuery UI Accordion - No auto height&lt;/title&gt;
    &lt;script src="//code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt;
    &lt;script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;div class="buttons"&gt;
        &lt;div&gt;&lt;a href="#btn1" class="btn btn-primary btn-large"&gt;One&lt;/a&gt;&lt;/div&gt;
        &lt;div&gt;&lt;a href="#btn2" class="btn btn-primary btn-large"&gt;Two&lt;/a&gt;&lt;/div&gt;
        &lt;div&gt;&lt;a href="#btn3" class="btn btn-primary btn-large"&gt;Three&lt;/a&gt;&lt;/div&gt;
        &lt;div&gt;&lt;a href="#btn4" class="btn btn-primary btn-large"&gt;Four&lt;/a&gt;&lt;/div&gt;
      &lt;/div&gt;
  
  
  &lt;div id="accordion"&gt;
    &lt;h3&gt;Section 1&lt;/h3&gt;
    &lt;div&gt;
      &lt;h3 id="btn1"&gt;One&lt;/h3&gt;
      &lt;p&gt;Mauris mauris ante, blandit et, ultrices a, susceros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.&lt;/p&gt;
      &lt;h3 id="btn2"&gt;Two&lt;/h3&gt;
      &lt;p&gt;Mauris mauris ante, blandit et, ultrices a, susceros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.&lt;/p&gt;
      &lt;h3 id="btn3"&gt;Three&lt;/h3&gt;
      &lt;p&gt;Mauris mauris ante, blandit et, ultrices a, susceros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.&lt;/p&gt;
      &lt;h3 id="btn4"&gt;Four&lt;/h3&gt;
      &lt;p&gt;Mauris mauris ante, blandit et, ultrices a, susceros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.&lt;/p&gt;
    &lt;/div&gt;
    &lt;h3&gt;Section 2&lt;/h3&gt;
    &lt;div&gt;
      &lt;p&gt;Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. &lt;/p&gt;
    &lt;/div&gt;
    &lt;h3&gt;Section 3&lt;/h3&gt;
    &lt;div&gt;
      &lt;p&gt;Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. &lt;/p&gt;
      &lt;ul&gt;
        &lt;li&gt;List item&lt;/li&gt;
        &lt;li&gt;List item&lt;/li&gt;
        &lt;li&gt;List item&lt;/li&gt;
        &lt;li&gt;List item&lt;/li&gt;
        &lt;li&gt;List item&lt;/li&gt;
        &lt;li&gt;List item&lt;/li&gt;
        &lt;li&gt;List item&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>My jquery:</p>
  
  <pre><code>  $(function() {
      $( "#accordion" ).accordion({
        heightStyle: "content",
        active: false,
        collapsible: true 
      });
    });
  </code></pre>