title: How do I trigger an event on jQuery Tabs rotate?
body: <p>I've got a slider that's built with <a href="http://jqueryui.com/demos/tabs/" rel="nofollow">jQuery UI Tabs</a>:</p>
  
  <pre><code>&lt;section id="featured"&gt;
      &lt;aside id="sidebar"&gt;
          &lt;ul class="ui-tabs-nav"&gt;
              &lt;li class="ui-tabs-nav-item ui-tabs-selected"&gt;
                  &lt;a href="#panel_1"&gt;[Tab Heading]&lt;/a&gt;
              &lt;/li&gt;
              &lt;li class="ui-tabs-nav-item"&gt;
                  &lt;a href="#panel_2"&gt;[Tab Heading]&lt;/a&gt;
              &lt;/li&gt;
              &lt;li class="ui-tabs-nav-item"&gt;
                  &lt;a href="#panel_3"&gt;[Tab Heading]&lt;/a&gt;
              &lt;/li&gt;
              &lt;li class="ui-tabs-nav-item"&gt;
                  &lt;a href="#panel_4"&gt;[Tab Heading]&lt;/a&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/aside&gt;
      &lt;section id="rotate_me"&gt;
          &lt;div class="featured_panel" id="panel_1"&gt;
              &lt;p&gt;[Tab Content]&lt;/p&gt;
          &lt;/div&gt;
          &lt;div class="featured_panel ui-tabs-hide" id="panel_2"&gt;
              &lt;p&gt;[Tab Content]&lt;/p&gt;
          &lt;/div&gt;
          &lt;div class="featured_panel ui-tabs-hide" id="panel_3"&gt;
              &lt;p&gt;[Tab Content]&lt;/p&gt;
          &lt;/div&gt;
          &lt;div class="featured_panel ui-tabs-hide" id="panel_4"&gt;
              &lt;p&gt;[Tab Content]&lt;/p&gt;
          &lt;/div&gt;
      &lt;/section&gt;
      &lt;script&gt;$('#featured').tabs('rotate', 4000, false);&lt;/script&gt;
  </code></pre>
  
  <p>The client wants the tabs to rotate through just the first and second tabs.</p>
  
  <p>I added a function to the <code>show</code> event:</p>
  
  <pre><code>.tabs({
      show: function(event, ui) {
          var selected = $( ".selector" ).tabs( "option", "selected" );
          if (selected == 3) {
              $( "#featured" ).tabs( "option", "selected", 1 );
          }
      }
  })
  </code></pre>
  
  <p>but this did nothing.</p>
  
  <p>Any idea how I could make the slider rotate through just the first and second tab?</p>