Sebastian
KPCKevin Powell - Community
•Created by Sebastian on 4/13/2023 in #front-end
Class toggle when div ID == var
Too long to paste it here, but slapped it up here: https://codepen.io/sebreed/pen/yLReWNo
Transitions are breaking because they link to my base.css, but otherwise the functionality is working.
5 replies
KPCKevin Powell - Community
•Created by Sebastian on 4/13/2023 in #front-end
Class toggle when div ID == var
This works amazingly. Thank you!
A short follow-up though, as some carousels will have 'x' amount of slides and others 'y' amount, and it feels superfluous to have to write out all potential scenarios. Currently I have the following running when clicking next-button and a reversed order on previous.
I don’t know if it is allowed in JS, but in my head I’m thinking: Can this be simplified by injecting the var into the ID?
5 replies