rafaelberrocalj
17 Jun 2010, 3:33 PM
in examples 'sencha-touch-beta-0.90/examples/carousel/index.html'
if we have
Ext.setup({
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
icon: 'icon.png',
glossOnIcon: false,
onReady: function() {
// Create a Carousel of Items
/*var carousel1 = new Ext.Carousel({
defaults: { cls: 'card' },
items: [{
html: '<h1>Carousel</h1><p>Navigate the two carousels on this page by swiping left/right or clicking on one side of the circle indicators below.</p>'
}, {
title: 'Tab 2',
html: '2'
}, {
title: 'Tab 3',
html: '3'
}]
});*/
var items = [];
for (var i = 0; i < 50; i++) {
items[items.length] = {
title: 'Tab ' + i,
html: 'test number ' + (i + 1)
};
};
var carousel2 = new Ext.Carousel({
ui: 'light',
defaults: { cls: 'card' },
items: [items]
});
new Ext.Panel({
fullscreen: true,
layout: {
type: 'vbox',
align: 'stretch'
},
defaults: {
flex: 1
},
items: [/*carousel1,*/ carousel2]
});
}
});
and i want to jump from 'tab 1' to 'tab 10' how can we do it?
if we have
Ext.setup({
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
icon: 'icon.png',
glossOnIcon: false,
onReady: function() {
// Create a Carousel of Items
/*var carousel1 = new Ext.Carousel({
defaults: { cls: 'card' },
items: [{
html: '<h1>Carousel</h1><p>Navigate the two carousels on this page by swiping left/right or clicking on one side of the circle indicators below.</p>'
}, {
title: 'Tab 2',
html: '2'
}, {
title: 'Tab 3',
html: '3'
}]
});*/
var items = [];
for (var i = 0; i < 50; i++) {
items[items.length] = {
title: 'Tab ' + i,
html: 'test number ' + (i + 1)
};
};
var carousel2 = new Ext.Carousel({
ui: 'light',
defaults: { cls: 'card' },
items: [items]
});
new Ext.Panel({
fullscreen: true,
layout: {
type: 'vbox',
align: 'stretch'
},
defaults: {
flex: 1
},
items: [/*carousel1,*/ carousel2]
});
}
});
and i want to jump from 'tab 1' to 'tab 10' how can we do it?