Forum /
Sencha Touch 1.x Forums /
Sencha Touch 1.x: Discussion /
Originally Posted by
nosarious
Troubleshooting completed. evant is using v0.93, a beta version.
well, yeah. Everyone is using a beta version. Thats kind of obvious.
Hi guys,
Besides having buttons that target to specific pages from the carousel, how would one go about it to have a next and previous button which can control the flow of the pages?
K
Evant's Simple example, updated to work with the current version of Sencha Touch
Evant's Simple example, updated to work with the current version of Sencha Touch
Ext.setup({
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
icon: 'icon.png',
glossOnIcon: false,
onReady: function() {
// Create a Carousel of Items
var carousel = new Ext.Carousel({
indicator: false,
listeners: {
afterrender: function(c){
c.body.on('click', function(e, t){
if(Ext.fly(t).hasCls('last')){
c.setActiveItem(2, {type:'slide',direction:'right'});
}else{
c.setActiveItem(0, {type:'slide',direction:'left'});
}
}, c, {delegate: 'a.move'});
}
},
defaults: {
cls: 'card'
},
items: [{
html: '<a class="move last" href="#">Go to last</a>'
},
{
title: 'Tab 2',
html: '2'
},
{
title: 'Tab 3',
html: '<a class="move first" href="#">Go to first</a>'
}]
});
new Ext.Panel({
fullscreen: true,
layout: {
type: 'vbox',
align: 'stretch'
},
defaults: {
flex: 1
},
items: [carousel]
});
}
});
Similar Threads
By yCD in forum Sencha Touch 1.x: Discussion
Replies: 2
Last Post: 31 Jul 2010, 9:51 AM
By Mphasize in forum Sencha Touch 1.x: Bugs
Replies: 6
Last Post: 1 Jul 2010, 11:41 AM
By Britace in forum Ext 2.x: Help & Discussion
Replies: 2
Last Post: 19 Nov 2009, 7:26 PM
By Juvs in forum Ext.air for Adobe AIR
Replies: 0
Last Post: 25 Sep 2008, 7:34 AM
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us