function getScrollParent(parent, child) {
  let element = child;
  let scrollTop = 0;

  while (element && element !== parent) {
    element = element.parentNode;
    scrollTop += element.scrollTop;
  }
  return scrollTop;
}
function getScrollParent(parent, child) {
  let element = child;
  let scrollTop = 0;

  while (element && element !== parent) {
    element = element.parentNode;
    scrollTop += element.scrollTop;
  }
  return scrollTop;
}
function getScrollParent ( parent , child ) { let element = child ; let scrollTop = 0 ; while ( element && element !== parent ) { element = element . parentNode ; scrollTop += element . scrollTop ; } return scrollTop ; }
Sum the scrollTop between two elements.
Sum the scrollTop between two elements .
Get the scrollTop of the parent element of child