title: jQuery UI Accordion Can't Open 3rd Panel Programatically
body: <p>Having trouble getting the 3rd panel in a Jquery UI Accordion to open via a jQuery program call, while keeping panels 1 and 2 closed. My HTML structure is like this:</p>
  
  <pre><code>&lt;div class="accordion1"&gt;
  &lt;div class="left-menu-title" id="restaurant"&gt;
    &lt;h3&gt;Restaurant&lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="left-menu clickable" id="nav-restaurant"&gt;
    &lt;div id="cat_581274_divs"&gt;
      &lt;ul id="nav_581274"&gt;
        &lt;li&gt;&lt;a href="/reservations"&gt;reservations&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="/menus"&gt;menus&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="left-menu-title" id="bakery"&gt;
    &lt;h3&gt;Bakery&lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="left-menu clickable" id="nav-bakery"&gt;
    &lt;div id="cat_581276_divs"&gt;
      &lt;ul id="nav_581276"&gt;
        &lt;li&gt;&lt;a href="/pastry-chef"&gt;our pastry chef&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="/bakery-menu"&gt;bakery menu&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="left-menu-title" id="wine"&gt;
    &lt;h3&gt;Wine Shop&lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="left-menu clickable" id="nav-wine"&gt;
    &lt;div id="cat_581280_divs"&gt;
      &lt;ul id="nav_581280"&gt;
        &lt;li&gt;&lt;a href="/wine-shop"&gt;about our wine shop&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="/wine-tastings"&gt;wine tastings &amp;amp; events&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
    
  
  <p>My accordian is initialized with:</p>
  
  <pre><code>$(".accordion1").accordion({ header: ".left-menu-title" });
  </code></pre>
  
  <p>and it works great. I am trying to programatically open the 3rd #wine Wine Shop panel with the Restaurant and Bakery panels closed, but when I use any of these ALL the panels open instead of just the 3rd:</p>
  
  <pre><code>$('.accordion1').accordion('activate', 2 );
  </code></pre>
  
  <p>doesn't work nor does</p>
  
  <pre><code>$('.accordion1').accordion('activate', 'div#wine');
  </code></pre>
  
  <p>nor does</p>
  
  <pre><code>$('.accordion1').accordion('activate', 'div#wine h3');
  </code></pre>
  
  <p>nor does</p>
  
  <pre><code>$('.accordion1').accordion('activate', '#nav-wine');
  </code></pre>
  
  <p>Obviously doing something wrong. Using jquery-ui-1.8.5.custom.min.js and jquery/1.4.2/jquery.min.js </p>