Created
April 16, 2021 08:29
-
-
Save wplit/42fc0d8af3ccb936fb69d18653425469 to your computer and use it in GitHub Desktop.
click to go to specific cell (add to button/link directly, advanced > javascript)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($) { | |
let carouselSelector = '.my-carousel'; /* Change to your carousel class */ | |
let index = 3; /* Change to needed cell index */ | |
$('#%%ELEMENT_ID%%').on('click', function(e) { | |
e.preventDefault() | |
$(carouselSelector).find($(carouselSelector).children().data('carousel')).flickity( 'select', index, false, true ); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment