Offset top js
Browser support: Returns the top position of the object relative to the top side of its offsetParent element, in pixels. This property is read-only. Integer that returns the top position, in pixels. Default: this property has no default value. This example retrieves the position of an element, relative to the top-left corner of the browser's client area, with the offsetLeft, offsetTop, scrollLeft and scrollTop properties. See the page for the getBoundingClientRect method for similar functionality.
This example retrieves the placement of the selected content in Internet Explorer:
User Contributed Comments |