Bryan Novak
Posts: 0
Joined: Thu May 01, 2014 4:29 pm

Carousel get current frame

Is it possible to grab the current frame of a carousel component with Javascript? I want to be able to set up a back button that won't wrap to the last page if the carousel is on the first slide.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Carousel get current frame

Hello Bryan,

You can use this code to get title of the current frame: $("[name=mobilecarousel_7]").find(".ui-carousel-active .ui-carousel-title").html();
where mobilecarouse_7 is your carousel component name.

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

Carousel get current frame

This currently - when used in on a carousel page - returns undefined.... what's the best way to do this today?

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

Carousel get current frame

I'm retracting my need to get this question answered - and instead will offer an update here.

If you are looking to be able to programatically determine which page is active on a carousel page .... here's the code you need (you can then navigate to another page, etc.... with this code:)

Code: Select all

var sactivepage = Appery("carousel_pages").carouselRoot.find(".ui-carousel-active").attr('name'); 

Where 'carousel_pages' is the top level carousel element - and is the 'parent' of all the other pages.

Happy Apperying ...(my new word for the day...)
Bruce

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Carousel get current frame

Hello Bruce :) Thank you for update!

Return to “Issues”