There seems to be no tap event for Ext.carousel.Carousel. How can I make a carousel respond to tap events? (tap, itemtap etc.)
Asked
Active
Viewed 1,355 times
1 Answers
4
Tap events do not work on the components directly. Instead they work fine on component's element. So, for your case you can use it like this:
In your controller's "control",
control : {
// Your carousel reference
"carousel" : {
initialize : function(carousel){
carousel.element.on('tap', function(e, el){
// Here you will get the target element
console.log(e.target, el);
}, this);
}
}
}
You can use delegate this way if you want to capture tap event on certain types of element only:
carousel.element.on('tap', function(e, el){
// Here you will get the target element
console.log(e.target, el);
}, this, {
delegate : 'div.my-element'
});
Hope this help.

Swar
- 5,473
- 3
- 31
- 43
-
hi,I use this code for my app;but i want to get which tap click.I have 4 tap in my carousel.I will create 4 js page for every tap.If user click first tap first js will open.How can i do? – tarikfasun Nov 17 '15 at 13:25