View Full Version : Carousel - click instead of swipe

13 Sep 2010, 2:59 PM

In Carousel2 of the examples you are able to click on a button in the top dock which allows you to go straight to a specific slide. I wish to use this function, but instead of having a button(s) docked at the top of the page, I would like text links to trigger the action. I currently use the below code to trigger a pop-up and have been experimenting with this in an attempt to trigger the on click carousel behaviour. However, I've failed. Any advice on how to do this and if it is possible would be greatly appreciated.

listeners: {
afterrender: function(c){
c.body.on('click', function(){
var overlay = new Ext.Panel({
floating: true,
modal: true,
centered: true,
height: 400,
width: 400,
html: '<p>I am an overlay</p>'
}, null, {delegate: 'div.cont'});

13 Sep 2010, 3:34 PM
Can you post a showcase or a link to a running example? I found carousel in ext-core, however, I have no clue how do you use it.

13 Sep 2010, 3:46 PM
The project I'm working on is currently at http://www.spikewebdesign.com.au/mrppp/Portfolio2/. There are 7 items (EDIT, EFFECTS, SOUND, DESIGN, 3D, PRODUCERS, SUPPORT) on the inital screen which I would like to click on which in turn navigate to their assoicated vertical carousel. At the moment the only way to get to one of the later sections is to swipe through all of the initial ones.


13 Sep 2010, 4:23 PM
Aaah, that's Sencha Touch, isn't it? You're in the wrong forum if yes. I can move this thread to Sencha Touch Help forum if you want.

13 Sep 2010, 4:30 PM
Oops, sorry. I just signed up to support so this is my first post in the premuim forums, if you could move it to the correct forum that would be terrific.


13 Sep 2010, 4:31 PM

13 Sep 2010, 5:31 PM
What you have is reasonably close, but the delegate is wrong. The delegate is supposed to be some selector to match children on the element you're binding the event to.

15 Sep 2010, 6:17 PM
Hi Evan,

Yep spot on, however, the main issue I'm having is altering the code so that it jumps to a particular carousel item, rather than launch a pop-up. I had been looking at the example Carousel2, but couldn't figure it out.