Make the second carousel item show slightly
Hello,
I'm using a vertical carousel with two items, and I'm trying to make it clear to the user that it's a carousel they're using. Therefore, assuming that the first carousel item is currently active, I want the second card to be pushed up slightly so that you can partially see it at the bottom.
I've tried the following. Bare in mind it isn't complete but my main thought process is there: If on the first card, it should add a class to the second card which pushes it up. It works to an extend, it applies the style and shows the second card, but then I can't remove it. Has anyone any ideas of how else to implement this?
Any help would be greatly appreciated.
Thanks
George
Sencha code:
Code:
xtype: 'carousel',
direction: 'vertical',
width: '100%',
height: '140px',
listeners: {
cardswitch: function(){
var CurrentPhotoIndex = this.getActiveIndex();
var CurrentPhotoItem = this.getActiveItem();
if(CurrentPhotoIndex == '0'){
Ext.getCmp('carouselitem1').addCls('raisecarouselitem')
} else if (CurrentPhotoIndex == '1'){
}
}
}
CSS code:
Code:
.raisecarouselitem {
-webkit-transform: translate(0,100px) !important;
-webkit-transition: all 0.1s ease-in-out !important;
}