title: Access data-toggle value with jquery
body: <p>I have to use jQuery for a project and I am trying to get the value of a selected tab. This is the HTML:</p>
  
  <pre><code>&lt;ul class="nav nav-tabs umb-nav-tabs" ng-if="tabs" model="tabs"&gt;&lt;li class="dropdown pull-right tabdrop hide" style="display: list-item;"&gt;&lt;a class="dropdown-toggle" data-toggle="dropdown" href="#"&gt;&lt;i class="icon-align-justify"&gt;&lt;/i&gt; &lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;&lt;ul class="dropdown-menu"&gt;&lt;/ul&gt;&lt;/li&gt;
    &lt;!-- ngRepeat: tab in model --&gt;&lt;li ng-class="{'tab-error': tabHasError}" ng-repeat="tab in model" val-tab="" class="ng-scope active" style="display: list-item;"&gt;
      &lt;a data-toggle="tab" href="#tab1" class="ng-binding"&gt;Home&lt;/a&gt;
    &lt;/li&gt;&lt;li ng-class="{'tab-error': tabHasError}" ng-repeat="tab in model" val-tab="" class="ng-scope" style="display: list-item;"&gt;
      &lt;a data-toggle="tab" href="#tab2" class="ng-binding"&gt;Swiss Home&lt;/a&gt;
    &lt;/li&gt;&lt;li ng-class="{'tab-error': tabHasError}" ng-repeat="tab in model" val-tab="" class="ng-scope" style="display: list-item;"&gt;
      &lt;a data-toggle="tab" href="#tab3" class="ng-binding"&gt;Brazil Home&lt;/a&gt;
    &lt;/li&gt;&lt;li ng-class="{'tab-error': tabHasError}" ng-repeat="tab in model" val-tab="" class="ng-scope" style="display: list-item;"&gt;
      &lt;a data-toggle="tab" href="#tab4" class="ng-binding"&gt;Get Started&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I want the HTML of the active tab:</p>
  
  <pre><code>&lt;li ng-class="{'tab-error': tabHasError}" ng-repeat="tab in model" val-tab="" class="ng-scope active" style="display: list-item;"&gt;
      &lt;a data-toggle="tab" href="#tab1" class="ng-binding"&gt;Home&lt;/a&gt;
    &lt;/li&gt;
  </code></pre>
  
  <p>Where it says Home, so I can fire some code based on that. Any help would be appreciated.</p>