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.
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.
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.
This currently - when used in on a carousel page - returns undefined.... what's the best way to do this today?
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
Hello Bruce Thank you for update!