All, I'm developing a circular carousel that will be used eventually as an Elementor Page Builder widget.
The carousel lays out correctly and animates correctly for the first click. Afterwards the grid containing the individual cards does not rotate to the correct new position. This throws off the cards' orientation.
Positions are stored in element's data attributes. They are being updated correctly on the click events
I've uploaded a sample of the code onto Code Pen: [https://codepen.io/aGeekonaBike/pen/VwMQMea]
Could someone to take a look and let me know if my logic is leading down a dark path.