w2utils.getSize

Returns the size or absolute position of the element in px including padding, margin and border.
getSize(el, type)
el HTML Element, element to evaluate
type string, size type
The element does not need to be absolutely positioned, but it absolution position is calculated. First parameter el is the element to be inspected (it can also be a jQuery object). Second parameter type can be one of the following:
  • width - the width of the element
  • height - the height of the element
  • +width - addition to width (padding, margin, border)
  • +height - addition to height (padding, margin, border)
  • left - the left coordinate of the element
  • right - the right coordinate of the element
  • top - the top coordinate of the element
  • bottom - the bottom coordinate of the element

User Comments

comments powered by Disqus