title: jQuery accordion with MVC 4 Razor | keep the active pane open
body: <p>I am using jQuery Accordion. Within accordion I have few links which makes a call to controller actions.</p>
  
  <pre><code>    &lt;div id="accordion" class="accordion"&gt;
      &lt;h1 class="requestsheader"&gt;&lt;a href="#1"&gt;Header 1&lt;/a&gt;&lt;/h1&gt;
      &lt;div&gt;
          &lt;table&gt;
  @foreach (var item in Model)
              {
  &lt;tr&gt;
                      &lt;td&gt;
                          @Html.DisplayFor(modelItem =&gt; item.Name)
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;div class="requestButton"&gt;
                              @Html.ActionLink("Send Request for Authorization", "SendRequest", new { id = item.Id })
                          &lt;/div&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
  }
  &lt;/table&gt;
      &lt;/div&gt;
  
  &lt;h1 class="requestsheader"&gt;&lt;a href="#2"&gt;header 2&lt;/a&gt;&lt;/h1&gt;
      &lt;div&gt;
  ...
  ...
  &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>following is javascript code:</p>
  
  <pre><code>$("#accordion").accordion({
          collapsible: true, clearStyle: true, heightStyle: "content", navigation: true,active:false   
      })
  </code></pre>
  
  <p>All the panes collapse after I make call to an action. I need a way to keep current pane opened after an action is called. If this can be done using hidden fields, What is the proper way of using hiddenfields in mvc.</p>