Page 1 of 1

Carousel get current frame

Posted: Wed May 28, 2014 5:22 pm
by Bryan Novak

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.


Carousel get current frame

Posted: Wed May 28, 2014 8:13 pm
by Evgene Karachevtsev

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.


Carousel get current frame

Posted: Wed Feb 25, 2015 12:03 am
by Bruce Stuart

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


Carousel get current frame

Posted: Wed Feb 25, 2015 6:17 am
by Bruce Stuart

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


Carousel get current frame

Posted: Wed Feb 25, 2015 6:45 am
by Maryna Brodina

Hello Bruce :) Thank you for update!