Hi all,
Javascript beginner here. I’m using the Flickity carousel plugin in a work project and am having a problem I can’t find a solution to. I want to use Javascript to make it so that every time a cell with a certain index number is selected, it transitions to a certain background color (using addClass or something).
Right now I have this kind of janky solution adding a different background-color transition to each .is-selected class, you can see here: https://codepen.io/Shortcutt/pen/oJyNob. This isn’t ideal because the background will always transition from the set neutral background color to each individual cell’s which doesn’t appear seamless.
Can anyone advise or at least send me in the right direction?