title: How to keep the tab open in accordion after page refresh ( after submit) using Jquery UI?
body: <p>for example, I have my second tab open in accordion. After the page refresh, I still want the second tab open, how can I achieve this?</p>
  
  <p>thanks.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="accordion"&gt;
    &lt;h3&gt;Section 1&lt;/h3&gt;
    &lt;div&gt;
      &lt;p&gt;
      Mauris mauris ante
      &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.
      &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;ul&gt;
        &lt;li&gt;List item one&lt;/li&gt;
        &lt;li&gt;List item two&lt;/li&gt;
        &lt;li&gt;List item three&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>