I have carousel for 4 image tap
this.add({
id: 'mainRow-' + index,
xtype: 'carousel', flex:1,
defaults: {
flex:1
}, items: [
{
html: '<p><img src="image.jpg"></p>'
},
{
html: '<p><img src="image.jpg">
},
{
html: '<p><img src="image.jpg">
}
]
});
I want to get which tap clicked.If user click first tap,firstview.js will be opened,for second tap,secondview.js.
My controller code is;
control : {
root: {
pop : 'onRootPop',
push : 'onRootPush'
},
"carousel" : {
initialize : function(carousel){
carousel.element.on('tap', function(e, el){
// Here you will get the target element
// console.log(e.target, el);
Logger.log("fassss" + el);
EDevlet.app.getController('MainController').showNews();
}, this);
}
}
}
},
if user click carousel ,initialize function work.But I have to get which tap clicked.(first second third)?.