Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

get active tab for Tabset

  • Loading branch information...
commit 3fef9037d90607c2b0865eb73a05eefd8a03492c 1 parent e09bf51
@jcarrig jcarrig authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/js/tab_set.js
View
6 src/js/tab_set.js
@@ -91,6 +91,12 @@
$(this._contents[index]).show();
this._callbacks[index]();
+ },
+
+ // returns the index of the selectedTab
+ // or -1 if no tab is selected
+ getActiveTab : function(){
+ return _(this._tabs).indexOf(_(this._tabs).find(function(tab){ return $(tab).hasClass('selected') }));
}
});
}());
Please sign in to comment.
Something went wrong with that request. Please try again.