source/Plx.js
function getElementTop(el) {
  let top = 0;
  let element = el;

  do {
    top += element.offsetTop || 0;
    element = element.offsetParent;
  } while (element);

  return top;
}
function getElementTop(el) {
  let top = 0;
  let element = el;

  do {
    top += element.offsetTop || 0;
    element = element.offsetParent;
  } while (element);

  return top;
}
function getElementTop ( el ) { let top = 0 ; let element = el ; do { top += element . offsetTop || 0 ; element = element . offsetParent ; } while ( element ) ; return top ; }
Get element's top offset
Get element s top offset