Open all sections in jQuery UI's accordion after page loading
<p>Hello i would like to have jQuery Ui's accordion opened after page loaded. For that i have found the below code on this site.</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;link rel="icon" type="../image/logo.png" href="image/logo.png" /&gt;
      &lt;title&gt;Survey&lt;/title&gt;
      &lt;link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.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 type="text/javascript"&gt;
          $( function() {
                $('#accordion').accordion({
                        collapsible:true,
                        heightStyle: 'content',
                        beforeActivate: function(event, ui) {
                             // The accordion believes a panel is being opened
                            if (ui.newHeader[0]) {
                                var currHeader  = ui.newHeader;
                                var currContent = currHeader.next('.ui-accordion-content');
                             // The accordion believes a panel is being closed
                            } else {
                                var currHeader  = ui.oldHeader;
                                var currContent = currHeader.next('.ui-accordion-content');
                            }
                             // Since we've changed the default behavior, this detects the actual status
                            var isPanelSelected = currHeader.attr('aria-selected') == 'true';

                             // Toggle the panel's header
                            currHeader.toggleClass('ui-corner-all',isPanelSelected).toggleClass('accordion-header-active ui-state-active ui-corner-top',!isPanelSelected).attr('aria-selected',((!isPanelSelected).toString()));

                            // Toggle the panel's icon
                            currHeader.children('.ui-icon').toggleClass('ui-icon-triangle-1-e',isPanelSelected).toggleClass('ui-icon-triangle-1-s',!isPanelSelected);

                             // Toggle the panel's content
                            currContent.toggleClass('accordion-content-active',!isPanelSelected)    
                            if (isPanelSelected) { currContent.slideUp(); }  else { currContent.slideDown(); }

                            return false; // Cancel the default action
                        }
                    });
                    $("#accordion&gt; div").accordion({
                        header: "h3",
                        autoHeight: false,
                        collapsible: true,
                        icons: icons
                    });
            });
      &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;div id="accordion"&gt;
          &lt;h3&gt;First header&lt;/h3&gt;
          &lt;div&gt;First content panel&lt;/div&gt;
          &lt;h3&gt;Second header&lt;/h3&gt;
          &lt;div&gt;Second content panel&lt;/div&gt;
        &lt;/div&gt;
    &lt;/body&gt;
</code></pre>

<p></p>

<p>My difficult concerns how i can proceed to make all accordion opened after page loaded even if all things are right.
Thank you!</p>