title: Retrieve 1st item ID for Active Accordion tab in jQuery
body: <p>I have an accordion with some list items inside (code below). Is there any way to find out the 1st item data-id of the active accordion tab. For example., on page load, the active tab is Temperature Gauge which is the 2nd tab. Now I want to retrieve the 1st option data-id which is 11.</p>
  
  <pre><code>&lt;script&gt;
     $(document).ready(function ()
     { 
        $("#accordion").accordion(
        {
          activate: function(event, ui)
          {
              var activeTab = $(this).accordion( "option", "active" );
              alert(activeTab);
  
              var intID = $('.SubCatFakeClass').attr("data-id");
              alert(intID);
  
          }
        });
  
     });
  &lt;/script&gt;
  
  &lt;div id="accordion"&gt;
  
  &lt;h3 class=""&gt;Pressure Gauge&lt;/h3&gt;
  
      &lt;div&gt;
          &lt;ul class="ulStyle"&gt;
              &lt;li&gt;
                  &lt;a href="#" data-id="2" class="SubCatFakeClass"&gt;Pressure Gauge&lt;/a&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;a href="#" data-id="3" class="SubCatFakeClass"&gt;Diff. Pressure Gauge&lt;/a&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;a href="#" data-id="10" class="SubCatFakeClass"&gt;Diaphragm Seal&lt;/a&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  
  &lt;h3 class=""&gt;Temperature Gauge&lt;/h3&gt;
      &lt;div&gt;
          &lt;ul class="ulStyle"&gt;
              &lt;li&gt;
                  &lt;a href="#" data-id="11" class="SubCatFakeClass"&gt;Temperature Gauge&lt;/a&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;a href="#" data-id="13" class="SubCatFakeClass"&gt;Thermowell&lt;/a&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  
  &lt;h3 class=""&gt;Switch&lt;/h3&gt;
      &lt;div&gt;
          &lt;ul class="ulStyle"&gt;
              &lt;li&gt;
                  &lt;a href="#" data-id="14" class="SubCatFakeClass"&gt;Pressure Switch&lt;/a&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;a href="#" data-id="18" class="SubCatFakeClass"&gt;Temperature Switch&lt;/a&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>