code: function getPos(el) {
    var rect = el.getBoundingClientRect(),
      scrollY = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
  
    return {
      top: rect.top + scrollY,
      bottom: rect.top + rect.height + scrollY,
      height: rect.height
    };
  }
docs: Get the position of a DOM element
  @param  {Element} el
  @return {object}