Skip to content

Instantly share code, notes, and snippets.

@mitchellsimoens
Created September 6, 2012 16:44
Show Gist options
  • Save mitchellsimoens/3658370 to your computer and use it in GitHub Desktop.
Save mitchellsimoens/3658370 to your computer and use it in GitHub Desktop.
setActiveItem and string/int
var cnt = new Ext.Container({
fullscreen : true,
layout : 'card',
items : [
{
xtype : 'toolbar',
docked : 'top',
items : [
{
text : 'Test (int)',
handler : function (button) {
cnt.setActiveItem(2);
}
},
{
text : 'Test (string) (error in console)',
handler : function(button) {
cnt.setActiveItem('2');
}
}
]
},
{
html : 'First Page'
},
{
html : 'Second Page'
},
{
html : 'Third Page'
}
]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment