title: Keeping the current accordion pane open after ASP.NET postback
body: <p>I have problem with keeping the active according open after the post-back of ASP.NET page.</p>
  
  <p>Here's the script:</p>
  
  <pre><code>$(document).ready(function() {
  
      $('.accordionButton').click(function() {
  
          //Remove the "accordionOn" calss from all button
          $('.accordionButton').removeClass('accordionOn');
  
          //Close all open divs
          $('.accordionContent').slideUp('normal');
  
          //Open the div
          if ($(this).next().is(':hidden') == true) {
  
          //Add the "accordionOn" class to the button
              $(this).addClass('accordionOn');
  
              //Open div
              $(this).next().slideDown('normal');
          }
  
      });
  
  });
  </code></pre>
  
  <p>Here's the mark-up:</p>
  
  <pre><code>&lt;div id="accordionWrapper"&gt;
          &lt;div class="accordionButton"&gt;
              Hearder 1&lt;/div&gt;
          &lt;div class="accordionContent"&gt;
              Content 1
              &lt;asp:Label ID="lblName" runat="server"&gt;&lt;/asp:Label&gt;
              &lt;br /&gt;
              &lt;asp:Button ID="btnSayHello" runat="server" Text="Say Hello" /&gt;
          &lt;/div&gt;
         &lt;div class="accordionButton"&gt;
          Hearder 2&lt;/div&gt;
      &lt;div class="accordionContent"&gt;
          Content 2
      &lt;/div&gt;    
         &lt;div class="accordionButton"&gt;
          Hearder 3&lt;/div&gt;
      &lt;div class="accordionContent"&gt;
          Content 3
      &lt;/div&gt;      
  
  &lt;/div&gt;
  </code></pre>
  
  <p>I'd like to persist the active accordion, the current open div, to stay open during the post-back of ASP.NET.</p>
  
  <p>Thank you.</p>