title: jquery tab auto slide
body: <p>I'm using the following code to create a tab in jquery and when someone clicks it opens that particular tab. So is it possible to modify it such that it can rotate the tabs at the specified interval.</p>
  
  <pre><code>    // Tabs
      // When page loads...
      $(".tab-content").hide(); //Hide all content
      $("ul.sidebar-tabs li:first").addClass("active").show(); //Activate first tab
      $(".tab-content:first").show(); //Show first tab content
  
      // On Click Event
      $("ul.sidebar-tabs li").click(function() {
  
          $("ul.sidebar-tabs li").removeClass("active"); //Remove any "active" class
          $(this).addClass("active"); //Add "active" class to selected tab
          $(".tab-content").hide(); //Hide all tab content
  
          var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
          $(activeTab).fadeIn(); //Fade in the active ID content
          return false;
      });
  </code></pre>
  
  <p>The html code for the same is,</p>
  
  <pre><code>&lt;ul class="sidebar-tabs"&gt;
       &lt;li&gt;&lt;a href="#tab-1"&gt;Tab1&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a href="#tab-2"&gt;Tab2&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;&lt;!-- //sidebar-tabs --&gt;
   &lt;div class="tab-container"&gt;
       &lt;div id="tab-1" class="tab-content"&gt;
       &lt;div&gt;
       &lt;div id="tab-2" class="tab-content"&gt;
       &lt;div&gt;
   &lt;/div&gt;
  </code></pre>