title: JQuery Accordion how to open particular header using script
body: <p>I have created a accordion menu using the following code</p>
  
  <pre><code>&lt;h3&gt;Level 1&lt;/h3&gt;
    &lt;div&gt;Content&lt;/div&gt;
  &lt;h3&gt;Level 2&lt;/h3&gt;
    &lt;div&gt;Content&lt;/div&gt;
  &lt;h3&gt;Level 3&lt;/h3&gt;
    &lt;div&gt;Content&lt;/div&gt;
  </code></pre>
  
  <p>I want to open the different level headers using code. I tried looking into accordion and widgets code but could not find any function for this.</p>
  
  <p>Please help me what code should be used to open a particular header. Also how to find if the head which should open is already open or not.</p>
  
  <p>I also tried using</p>
  
  <pre><code>$("#rightMenuAccordion").activate('activate',1)
  </code></pre>
  
  <p>as listed <a href="http://jqueryui.com/demos/accordion/#method-activate" rel="nofollow">here</a> but it says it does not exist</p>
  
  <p>This is the code I am using to create accordion</p>
  
  <pre><code>&lt;div id="rightMenuAccordion" 
      style="position:absolute;width:100%;height:100%;left:0px;top:0px;"&gt;&lt;/div&gt;
  
  $("#rightMenuAccordion").
      accordion({autoHeight: false, navigation: true, collapsible: false});
  </code></pre>