function getStyle(el, cssprop) {
      if (el.currentStyle) { //IE
        return el.currentStyle[cssprop];
      } else if ($window.getComputedStyle) {
        return $window.getComputedStyle(el)[cssprop];
      }
      // finally try and get inline style
      return el.style[cssprop];
    }
A set of utility methods that can be use to retrieve position of DOM elements.
It is meant to be used where we need to absolute-position DOM elements in
relation to other, existing elements (this is the case for tooltips, popovers,
typeahead suggestions etc.).