4

Dows anybody knows how to delete all elements on a carousel in sencha???

carousel = new Ext.Carousel({
    fullscreen: true,
    defaults: {
        cls: 'carousel-item'
    },
    items: [{
            id:'tab-1',
            html: '',
            cls: 'card card1'
        },{
            id:'tab-2',
            html: '<p>Clicking on either side of the indicators below</p>',
            cls: 'card card2'
        },{
            id:'tab-3',
            html: 'Card #3',
            cls: 'card card3'
        }]
});

Thanks a lot

José Carlos
  • 1,005
  • 16
  • 29

1 Answers1

5

You can clear all the components inside your carousel with just a line of code:

carousel.removeAll();

Hope this helps.

  • You are welcome José. If you are learning Sencha Touch, I suggest to visit the free course I'm writing on my website here http://www.andreacammarata.com/en/corsi/sencha-touch/ – Andrea Cammarata May 31 '11 at 17:02
  • Thanks a lot I'm having a look for it. If its not dificult, could you please help with this? http://stackoverflow.com/questions/6190981/animated-slide-transition-in-sencha-touch – José Carlos May 31 '11 at 17:04
  • Is written in italian but you can translate it by the flag on the page top. I wuold like to write it in native english, but I really have to less time to do it. – Andrea Cammarata May 31 '11 at 17:12