title: jquery uitabs off by -1
body: <p>I dynamically add and remove tabs. I now try to go to a specific tab by index as follows:</p>
  
  <pre><code>var elem = ('[role="tabpanel"][symbol="'+symbol+'"][exchange="'+exchange+'"]');
  var index = $(elem).index();
  $("#tabs").tabs({active: index});
  </code></pre>
  
  <p>The relevant html code is:</p>
  
  <pre><code>&lt;div id="tabs-1" aria-labelledby="ui-id-1" class="ui-tabs-panel ui-widget-content ui-corner-bottom" role="tabpanel" aria-expanded="false" aria-hidden="true" style="display: none;"&gt;&lt;/div&gt;
  &lt;div id="tabs-2" aria-labelledby="ui-id-2" class="ui-tabs-panel ui-widget-content ui-corner-bottom" role="tabpanel" aria-expanded="false" aria-hidden="true" style="display: none;" tabcounter="2" symbol="MSFT" exchange="NASDAQ"&gt;&lt;/div&gt;
  &lt;div id="tabs-3" aria-labelledby="ui-id-3" class="ui-tabs-panel ui-widget-content ui-corner-bottom" role="tabpanel" aria-expanded="false" aria-hidden="true" tabcounter="3" symbol="GOOG" exchange="NASDAQ" style="display: none;"&gt;&lt;/div&gt;
  &lt;div id="tabs-4" aria-labelledby="ui-id-4" class="ui-tabs-panel ui-widget-content ui-corner-bottom" role="tabpanel" aria-expanded="true" aria-hidden="false" tabcounter="4" symbol="YHOO" exchange="NASDAQ" style="display: block;"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>In order for it to work I need to do:</p>
  
  <pre><code>$("#tabs").tabs({active: index-1});
  </code></pre>
  
  <p>I'm not sure why the "-1" is required.</p>
  
  <p>I'm not sure why or what I'm messing here...</p>