set the target position to the relative (0..1) scroll position


  function handleScroll() {
  targetPosition = win.scrollTop() / scrollHeight;
  }