Page 1 of 1

How to Bind to Carousel Events

Posted: Wed Jul 13, 2016 3:48 pm
by William Bradee

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


How to Bind to Carousel Events

Posted: Wed Jul 13, 2016 5:08 pm
by Bruce Stuart

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


How to Bind to Carousel Events

Posted: Wed Jul 13, 2016 6:41 pm
by William Bradee

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