title: How do I get a reference to the currently selected tab in a Kendo UI TabStrip?
body: <p>I'm creating a method to delete a Kendo UI TabStrip Tab based on an 'x' image. I want it to work in the same way as other tab controls (such as Chrome/IE):</p>
  
  <ul>
  <li>If the active tab is closed then select the next tab (or if it's the last tab then select previous tab).</li>
  <li>If it's not an active tab then ensure the active tab remains open.</li>
  </ul>
  
  <p>I believe I need to get a reference to the current tab, then check if the tab being deleted is the active tab.</p>
  
  <p>My code at the moment simply closes the tab in relation to the clicked image:</p>
  
  <pre><code>function DeleteTab(imgObj) {
  
          var tabStrip = $("#tabstrip").data("kendoTabStrip");
  
          var deleteIndex = $(imgObj).closest("li").index();
          tabStrip.remove(deleteIndex);
  }
  </code></pre>
  
  <p>How do I get a reference to the currently selected tab? Can I do this by searching for <code>k-state-active</code>?</p>