Quantcast
Channel: SCN: Message List - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 8124

Re: Onclick Action on Carousel image

$
0
0

Hi Zaghman,

 

what you are doing with this code is trying to register an event handler to the "click" event of the commons.Carousel. However, that control does not have such an event. This is why nothing happens.

 

You seem to be displaying images inside, so are these sap.ui.commons.Image controls? Those do have a "press" event and you can attach to that one similarly as above.

 

Otherwise you can also listen to native browser events:

oCarousel.attachBrowserEvent("click", function()...});

But in this case you need to think about touch and keyboard interaction yourself. The "press" event of the Image handles this for you automatically.

 

Regards

Andreas


Viewing all articles
Browse latest Browse all 8124

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>