title: How to make bootstrap widget accordion toggle instead of open and close
body: <p>I have looked at a ton of examples and just can't seem to get this right.  I would like this accordion code to toggle, I want to click and open/close each heading individually... since I am calling out to the javascript, is there something I can add to this page to make it work the way I want? Could someone show me what that would be and where I would put it?  Thanks for any help offered!</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
          &lt;title&gt;jQuery UI Accordion - Default functionality&lt;/title&gt;
          &lt;link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"&gt;
          &lt;link rel="stylesheet" href="/resources/demos/style.css"&gt;
          &lt;script src="https://code.jquery.com/jquery-1.12.4.js"&gt;&lt;/script&gt;
          &lt;script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"&gt;&lt;/script&gt;
          &lt;script&gt;
              $( function() {
                  $( "#accordion" ).accordion();
              } );
              &lt;/script&gt;
          &lt;/head&gt;
          &lt;body&gt;
                  &lt;div id="accordion"&gt;
                      &lt;h3&gt;Section 1&lt;/h3&gt;
                      &lt;div&gt;
                          &lt;p&gt;Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integerut neque.&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 ame purus.&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.&lt;/p&gt;
              &lt;/div&gt;
                  &lt;h3&gt;Section 4&lt;/h3&gt;
                  &lt;div&gt;
                          &lt;p&gt;Cras dictum. Pellentesque habitant morbi tristique senectus et netuet malesuada.&lt;/p&gt;
              &lt;/div&gt;
              &lt;/div&gt;
          &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>