Skip to content

Instantly share code, notes, and snippets.

@meeech
Created January 22, 2011 19:47
Show Gist options
  • Save meeech/791394 to your computer and use it in GitHub Desktop.
Save meeech/791394 to your computer and use it in GitHub Desktop.
var tabInit = function(id) {
var tabview = new Y.TabView({
srcNode: id
});
tabview.render();
// @dev used when doing a lot of refresh/modify cycle
// tabview.selectChild(0);
tabview.on('selectionChange', function(e) {
console.log(e);
console.log(tabview.get('selected'));
// var selectedTab = e.newVal;
// console.log(selectedTab);
// console.log(selectedTab.getAttribute('tabIndex'));
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment