I have this tab. Is there a way to detect whenever the active tab has been changed? 

```
<div class="navbar">
   <div class="navbar-inner">
      <ul class="nav nav-tabs" style="display:inline-flex">
          <li class="active"><a href="#step1" data-toggle="tab" id="step1">Step 1</a></li>
          <li><a href="#step2" data-toggle="tab" id="step2">Step 2</a></li>
          <li><a href="#step3" data-toggle="tab" id="step3">Step 3</a></li>
          <li><a href="#step4" data-toggle="tab" id="step4">Step 4</a></li>
          <li><a href="#step5" data-toggle="tab" id="step5">Step 5</a></li>
          <li><a href="#step6" data-toggle="tab" id="step6">Step 6</a></li>
          <li><a href="#step7" data-toggle="tab" id="step7">Step 7</a></li>
         </ul>
      </div>
  </div>

```

I want to get what the ids of the tab that was the former active and also get what is the new active tab. Is this possible?