In Google Web Designer, I've added a carousel control. How can I know which image the user is currently viewing?
I added a new Frame Activated
event, and created a custom action:
<script type="text/javascript" gwd-events="handlers">
window.gwd = window.gwd || {};
gwd.boardSelectionChanged = function(event) {
// which frame is showing now?
};
</script>
I need to know the current frame id.
You can get the current frame index using the following example:
'gwd-carouselgallery_1'
is the ID of the carousel.