JQuery Tabbing Issue
<p>I have some html and JQuery that is used to create a page with tabbed content.  The html is below:</p>

<pre><code>&lt;section id="content" class="content"&gt;
    &lt;ul class="tabs group"&gt;
         &lt;li&gt;&lt;a href="#"&gt;Tab 1&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href="#"&gt;Tab 2&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href="#"&gt;Tab 3&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;div class="panes"&gt;
         &lt;div class="group"&gt;
              tab1
         &lt;/div&gt;         
         &lt;div class="group"&gt;
              tab2
         &lt;/div&gt;         
         &lt;div class="group"&gt;
              tab3
         &lt;/div&gt;   
    &lt;/div&gt;
&lt;/section&gt;
</code></pre>

<p>The JQuery is here:</p>

<pre><code>&lt;script type="text/javascript"&gt;
        $(document).ready(function () {        
            $('.activetab a').each(function () {
                var activeTab = $(this).parents('li').index();
                var paneVisible = $(this).parents('ul').next().children('div').eq(activeTab);
                paneVisible.show().siblings().hide();
            });

            $('.tabs a').click(function () {           
                $(this).parents('li').addClass('activetab').siblings().removeClass('activetab'); var activeTab = $(this).parent('li').index();
                var paneVisible = $(this).parents('ul').next().children('div').eq(activeTab);
                paneVisible.show().siblings().hide();
                return false;
            });
        });
    &lt;/script&gt;  
</code></pre>

<p>This code works in the sense that when I click on one of the links the data in the correct tab appears.  </p>

<p>The only problem is that when I go to the page (containing these tabs) for the first time I get the data from all the tabs displayed to me.  I need some extra code in my document ready function to display the data from the first tab and hide all the other data (and of course to highlight the first tab as well).  Any ideas how I may do this.  I am no JQuery/JavaScript expert.</p>

<p>Thanks,</p>

<p>Sachin</p>
