pagelets/nodejitsu/tooltip/base.js
function (element) {
    var left = 0
      , top = 0;

    do {
      left += element.offsetLeft;
      top += element.offsetTop;
    } while (element = element.offsetParent);

    return {
      left: left,
      top: top
    };
  }
function (element) {
    var left = 0
      , top = 0;

    do {
      left += element.offsetLeft;
      top += element.offsetTop;
    } while (element = element.offsetParent);

    return {
      left: left,
      top: top
    };
  }
function ( element ) { var left = 0 , top = 0 ; do { left += element . offsetLeft ; top += element . offsetTop ; } while ( element = element . offsetParent ) ; return { left : left , top : top } ; }
Calculate the position of the current element that acted as trigger. Used
for proper position of the tooltip.

@param {Object} element
@return {Object} offsets top and left
@api private
Calculate the position of the current element that acted as trigger . Used for proper position of the tooltip .