code: function offset ( elem, orientation ) {
  
          var rect = elem.getBoundingClientRect(),
              doc = elem.ownerDocument,
              docElem = doc.documentElement,
              pageOffset = getPageOffset();
  
          // getBoundingClientRect contains left scroll in Chrome on Android.
          // I haven't found a feature detection that proves this. Worst case
          // scenario on mis-match: the 'tap' feature on horizontal sliders breaks.
          if ( /webkit.*Chrome.*Mobile/i.test(navigator.userAgent) ) {
              pageOffset.x = 0;
          }
  
          return orientation ? (rect.top + pageOffset.y - docElem.clientTop) : (rect.left + pageOffset.x - docElem.clientLeft);
      }
docs: Current position of an element relative to the document.