Why can’t I set this variable from undefined to the data I capture in the conditional statement?
What I am trying to do is move an element in accordance with the scroll top movement, once it appears in the browser. I am trying to capture an initial scroll top value and save that for some math on the object. The problem is that my variable remains undefined even though it appears to be set in the function.