William Bradee
Posts: 0
Joined: Thu Oct 03, 2013 8:45 pm

How to Bind to Carousel Events

I need to keep track of what image is displayed in the carousel so I would like to bind to the "show" event. But the documentation isn't very clear of how to bind to it, and what parameters are passed to the function you bind (or maybe none?).

Then how do you find which image is currently displayed?

I tried $('.ui-carousel-active'); but that returns [].

This is JQuery Mobile

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

How to Bind to Carousel Events

William,

Happy Wednesday.

var sactivepage = Appery("carousel_pages").carouselRoot.find(".ui-carousel-active").attr('name'); // where 'carousel_pages is the name of your carousel....

that will tell you the name of the active page....

Best,

Bruce

William Bradee
Posts: 0
Joined: Thu Oct 03, 2013 8:45 pm

How to Bind to Carousel Events

Never mind I have decided to use another open-source component. I think the Appery Carousel is good for viewing pictures, but I need more external control

Return to “Issues”