Created
November 24, 2020 00:55
-
-
Save wplit/5e7da1616dbfd6b963e925ec4391c8fc to your computer and use it in GitHub Desktop.
resize carousel when font size switch clicked.
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($) { | |
var myflkty = Flickity.data('.flickity-enabled'); // get flickity | |
$( ".acwp-switcher" ).on( "click", function() {. // listen for clicking the font size switches | |
setTimeout(function() { | |
myflkty.resize(); // wait 100ms, then resize the carousel | |
}, 100); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment