outerHeight

function
 outerHeight() 

Option name Type Description
el Element
styles Object

Optional Already have computed styles? Pass them in.

function outerHeight(el, styles) {

  styles = styles || window.getComputedStyle(el);

  var props = ['marginTop', 'marginBottom', 'borderTop', 'borderBottom'];
  var height = el.clientHeight;

  props.forEach(function(prop) {
    height += parseInt(styles[prop] || 0, 10);
  });

  return height;
}

Base.exportjQuery(outerHeight, 'outerHeight');

return outerHeight;
}));