After watching several hours of tutorials I didn't find answer for my example.
I have a simple timeline for every button with click event attached to every button also.
Animation of the buttons is fine. But animation of "marker" or "slider" that travels x distance
to reach clicked button does not start from current position (unless you always click between
1st and 3rd button). So if, for example, you click on 2nd button, and after that you click on 3rd
button the transition of "marker" element won't happen from 2nd to 3rd button but instead
from 1st button to 3rd button.
I thought that using .to will make animation of target element from current state to desired state
(in this case movement on x axis). What am I doing wrong?
Also - after "marker" moves from certain button to another button, the color of the letters on the
button should change but I don't know how to target specific button, how to know which button
was "active" before clicking another button. (I solved this with a trick I saw somewhere - turn all colors
to be the same and just change color of the new active button - but what if I want more control over
button that was active before?)