thanks - that does help clear up what's happening and lets me understand what's happening under the hood.
- Sorry to take this a step further but I am adding some anchor tags so it can scroll you to the correct card via the url.
- you'll see I added a button on the left that I am simply using to illustrate my problem here.
- when someone clicks the button the scroller should scroll to that card - number 10 (the card should have it's start point on the left of the screen).
- it should be relatively simple : calculate the y position where the card is on the scroller, then tell the scroller to go to that pixel value.
the problem is the scroller doesn't go anywhere near that point.
any clues?
p.s I added some extra code to the button to show I am calculating the position of the target card via 2 methods (.position() + looping thro). both calculate the same value and the scroller is certainly at that point (I added a listener to console out the current pos) but the card isn't in the correct place.
just can't figure it out
https://codepen.io/b-t-l/pen/abjdKPN?editors=1111