title: How to set default tab in tabbed panel in dreamweaver using javascript
body: <p>I'm trying to set the default tab in my tabbed panels. In Dreamweaver I used the following code:</p>
  
  <pre><code>&lt;div id="TabbedPanels1" class="TabbedPanels" style="margin: 0 0 20px;"&gt;
   &lt;ul class="TabbedPanelsTabGroup"&gt;
   &lt;li class="TabbedPanelsTab" tabindex="0"&gt;Tab1&lt;/li&gt;
   &lt;li class="TabbedPanelsTab" tabindex="0"&gt;Tab2&lt;/li&gt;
   &lt;/ul&gt;
  &lt;div class="TabbedPanelsContentGroup"&gt;
    &lt;div class="TabbedPanelsContent" &gt;
     content 1
    &lt;/div&gt;
    &lt;div class="TabbedPanelsContent" &gt;
     content 2
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want tab2 to be <code>default(selected)</code> when displayed, so I used following JavaScript:</p>
  
  <pre><code>var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1",{defaultTab:1});
  </code></pre>
  
  <p>but it still shows first tab selected instead of second as I want. Why is this happening? Where was I wrong?</p>