<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>Prototype JavaScript framework - Position</title>
  <id>tag:prototypejs.org,2011:mephisto/api/position</id>
  <generator uri="http://mephistoblog.com" version="0.7.3">Mephisto Noh-Varr</generator>
  <link href="http://prototypejs.org/feed/api/position/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://prototypejs.org/api/position" rel="alternate" type="text/html"/>
  <updated>2007-11-11T10:09:08Z</updated>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:prototypejs.org,2006-12-05:12752</id>
    <published>2006-12-05T21:48:00Z</published>
    <updated>2007-11-11T10:09:08Z</updated>
    <category term="Position"/>
    <link href="http://prototypejs.org/api/position" rel="alternate" type="text/html"/>
    <title>Position</title>
<content type="html">
            &lt;p class=&quot;deprecated&quot;&gt;As of Prototype 1.6, the complete &lt;code&gt;Position&lt;/code&gt; object has been deprecated in favor of  methods on the &lt;a href=&quot;/api/element&quot;&gt;&lt;code&gt;Element&lt;/code&gt;&lt;/a&gt; object.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;Position&lt;/code&gt; object provides a series of methods that help with element positioning and layout-related issues. These are mainly used by third party UI libraries like &lt;a href=&quot;http://script.aculo.us&quot;&gt;script.aculo.us&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:prototypejs.org,2006-11-02:12377</id>
    <published>2006-11-02T22:15:00Z</published>
    <updated>2008-10-26T19:29:36Z</updated>
    <category term="Position"/>
    <category term="deprecated"/>
    <link href="http://prototypejs.org/api/position/absolutize" rel="alternate" type="text/html"/>
    <title>absolutize</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;absolutize(element)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Turns &lt;code&gt;element&lt;/code&gt; into an absolutely-positioned element &lt;em&gt;without&lt;/em&gt; changing its position in the page layout.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;absolutize(element)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Turns &lt;code&gt;element&lt;/code&gt; into an absolutely-positioned element &lt;em&gt;without&lt;/em&gt; changing its position in the page layout.&lt;/p&gt;
&lt;p class=&quot;deprecated&quot;&gt;Deprecated in favor of &lt;a href=&quot;/api/element/absolutize&quot;&gt;&lt;code&gt;Element#absolutize&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:prototypejs.org,2006-11-02:12378</id>
    <published>2006-11-02T22:15:00Z</published>
    <updated>2007-11-07T20:40:45Z</updated>
    <category term="Position"/>
    <category term="deprecated"/>
    <link href="http://prototypejs.org/api/position/relativize" rel="alternate" type="text/html"/>
    <title>relativize</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;relativize(element)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Turns &lt;code&gt;element&lt;/code&gt; into an relatively-positioned element &lt;em&gt;without&lt;/em&gt; changing its position in the page layout.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;relativize(element)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Turns &lt;code&gt;element&lt;/code&gt; into an relatively-positioned element &lt;em&gt;without&lt;/em&gt; changing its position in the page layout.&lt;/p&gt;
&lt;p class=&quot;deprecated&quot;&gt;Deprecated in favor of &lt;a href=&quot;/api/element/relativize&quot;&gt;&lt;code&gt;Element#relativize&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:prototypejs.org,2006-11-02:12374</id>
    <published>2006-11-02T22:14:00Z</published>
    <updated>2007-12-23T16:15:02Z</updated>
    <category term="Position"/>
    <category term="deprecated"/>
    <link href="http://prototypejs.org/api/position/overlap" rel="alternate" type="text/html"/>
    <title>overlap</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;overlap(mode, element) -&gt; Number&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns a Number between &lt;code&gt;0&lt;/code&gt; and &lt;code&gt;1&lt;/code&gt; corresponding to the proportion to which &lt;code&gt;element&lt;/code&gt; overlaps the point previously defined by &lt;a href=&quot;/api/position/within&quot;&gt;Position.within&lt;/a&gt;. &lt;code&gt;mode&lt;/code&gt; can be set to either &lt;code&gt;vertical&lt;/code&gt; or &lt;code&gt;horizontal&lt;/code&gt;.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;overlap(mode, element) -&gt; Number&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns a Number between &lt;code&gt;0&lt;/code&gt; and &lt;code&gt;1&lt;/code&gt; corresponding to the proportion to which &lt;code&gt;element&lt;/code&gt; overlaps the point previously defined by &lt;a href=&quot;/api/position/within&quot;&gt;Position.within&lt;/a&gt;. &lt;code&gt;mode&lt;/code&gt; can be set to either &lt;code&gt;vertical&lt;/code&gt; or &lt;code&gt;horizontal&lt;/code&gt;.&lt;/p&gt;
&lt;p class=&quot;deprecated&quot;&gt;Deprecated.&lt;/p&gt;

&lt;p&gt;Imagine a block-level &lt;code&gt;element&lt;/code&gt; (i.e., with dimensions) and a point &lt;code&gt;x, y&lt;/code&gt; measured in pixels from the top left corner of the page.  Calling &lt;a href=&quot;/api/position/within&quot;&gt;Position.within&lt;/a&gt; will indicate whether that point is within the area occupied by &lt;code&gt;element&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now imagine an element of equal dimensions to &lt;code&gt;element&lt;/code&gt; with its top left corner at &lt;code&gt;x, y&lt;/code&gt;.  &lt;code&gt;Position.overlap&lt;/code&gt; indicates the amount these two boxes overlap in either the horizontal or vertical direction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note that &lt;a href=&quot;/api/position/within&quot;&gt;Position.within&lt;/a&gt; must be called right before calling this method.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;Example&lt;/h3&gt;

&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;
var element = $('some_positioned_element');
Position.cumulativeOffset(element);
// -&gt; [100, 100] (element is 100px from the top and left edges of the page)
element.getDimensions();
// -&gt; { width: 150, height: 150 }

Position.within(element, 175, 145);
// -&gt; true

Position.overlap('horizontal', element);
// -&gt; 0.5 (point is halfway across the element's length)

Position.overlap('vertical', element);
// -&gt; 0.3 (point is 3/10ths of the way across the element's height)
&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:prototypejs.org,2006-11-02:12375</id>
    <published>2006-11-02T22:14:00Z</published>
    <updated>2007-11-08T01:07:14Z</updated>
    <category term="Position"/>
    <category term="deprecated"/>
    <link href="http://prototypejs.org/api/position/page" rel="alternate" type="text/html"/>
    <title>page</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;page(element) -&gt; [Number, Number]&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns the X/Y coordinates of &lt;code&gt;element&lt;/code&gt; relative to the &lt;em&gt;viewport&lt;/em&gt;.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;page(element) -&gt; [Number, Number]&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns the X/Y coordinates of &lt;code&gt;element&lt;/code&gt; relative to the &lt;em&gt;viewport&lt;/em&gt;.&lt;/p&gt;
&lt;p class=&quot;deprecated&quot;&gt;Deprecated in favor of &lt;a href=&quot;/api/element/viewportoffset&quot;&gt;&lt;code&gt;Element#viewportOffset&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that all values are returned as &lt;em&gt;numbers only&lt;/em&gt; although they are &lt;em&gt;expressed in pixels&lt;/em&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:prototypejs.org,2006-11-02:12376</id>
    <published>2006-11-02T22:14:00Z</published>
    <updated>2007-11-07T20:48:28Z</updated>
    <category term="Position"/>
    <category term="deprecated"/>
    <link href="http://prototypejs.org/api/position/clone" rel="alternate" type="text/html"/>
    <title>clone</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;clone(source, target[, options]) -&gt; [Number, Number]&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Clones the position and/or dimensions of &lt;code&gt;source&lt;/code&gt; onto &lt;code&gt;target&lt;/code&gt; as defined by the optional argument &lt;code&gt;options&lt;/code&gt;. &lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;clone(source, target[, options]) -&gt; [Number, Number]&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Clones the position and/or dimensions of &lt;code&gt;source&lt;/code&gt; onto &lt;code&gt;target&lt;/code&gt; as defined by the optional argument &lt;code&gt;options&lt;/code&gt;. &lt;/p&gt;
&lt;p class=&quot;deprecated&quot;&gt;Deprecated in favor of &lt;a href=&quot;/api/element/cloneposition&quot;&gt;&lt;code&gt;Element#clonePosition&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that &lt;code&gt;target&lt;/code&gt; will be positioned exactly like &lt;code&gt;source&lt;/code&gt; whether or not it is part of the same &lt;a href=&quot;http://www.w3.org/TR/CSS21/visudet.html#containing-block-details&quot;&gt;CSS containing block&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Options&lt;/h3&gt;

&lt;table&gt;
&lt;thead&gt;
  &lt;tr&gt;
    &lt;th&gt;Name&lt;/th&gt;
    &lt;th&gt;Default&lt;/th&gt;
    &lt;th&gt;Description&lt;/th&gt;
  &lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
  &lt;tr&gt;
  &lt;td&gt;&lt;code&gt;setLeft&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;clones &lt;code&gt;source&lt;/code&gt;&#8217;s &lt;code&gt;left&lt;/code&gt; CSS property onto &lt;code&gt;target&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;code&gt;setTop&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;clones &lt;code&gt;source&lt;/code&gt;&#8217;s &lt;code&gt;top&lt;/code&gt; CSS property onto &lt;code&gt;target&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;code&gt;setWidth&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;clones &lt;code&gt;source&lt;/code&gt;&#8217;s &lt;code&gt;width&lt;/code&gt; onto &lt;code&gt;target&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;code&gt;setHeight&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;clones &lt;code&gt;source&lt;/code&gt;&#8217;s &lt;code&gt;width&lt;/code&gt; onto &lt;code&gt;target&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;code&gt;offsetLeft&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Number by which to offset &lt;code&gt;target&lt;/code&gt;&#8217;s &lt;code&gt;left&lt;/code&gt; CSS property.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;code&gt;offsetTop&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Number by which to offset &lt;code&gt;target&lt;/code&gt;&#8217;s &lt;code&gt;top&lt;/code&gt; CSS property.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
          </content>  </entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:prototypejs.org,2006-11-02:12373</id>
    <published>2006-11-02T22:13:00Z</published>
    <updated>2007-12-23T16:16:43Z</updated>
    <category term="Position"/>
    <category term="deprecated"/>
    <link href="http://prototypejs.org/api/position/withinIncludingScrolloffsets" rel="alternate" type="text/html"/>
    <title>withinIncludingScrolloffsets</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;withinIncludingScrolloffsets(element, x, y) -&gt; Boolean&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Indicates whether the point &lt;code&gt;x, y&lt;/code&gt; (measured from the top-left corner of the document) is within the boundaries of &lt;code&gt;element&lt;/code&gt;.  Used instead of &lt;a href=&quot;/api/position/within&quot;&gt;Position.within&lt;/a&gt; whenever &lt;code&gt;element&lt;/code&gt; is a child of a scrolling container. Must be called immediately before &lt;a href=&quot;/api/position/overlap&quot;&gt;Position.overlap&lt;/a&gt; and immediately after &lt;a href=&quot;/api/position/prepare&quot;&gt;Position.prepare&lt;/a&gt;.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;withinIncludingScrolloffsets(element, x, y) -&gt; Boolean&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Indicates whether the point &lt;code&gt;x, y&lt;/code&gt; (measured from the top-left corner of the document) is within the boundaries of &lt;code&gt;element&lt;/code&gt;.  Used instead of &lt;a href=&quot;/api/position/within&quot;&gt;Position.within&lt;/a&gt; whenever &lt;code&gt;element&lt;/code&gt; is a child of a scrolling container. Must be called immediately before &lt;a href=&quot;/api/position/overlap&quot;&gt;Position.overlap&lt;/a&gt; and immediately after &lt;a href=&quot;/api/position/prepare&quot;&gt;Position.prepare&lt;/a&gt;.&lt;/p&gt;
&lt;p class=&quot;deprecated&quot;&gt;Deprecated.&lt;/p&gt;

&lt;p&gt;This method handles an edge case of &lt;a href=&quot;/api/position/within&quot;&gt;&lt;code&gt;Position.within&lt;/code&gt;&lt;/a&gt;: when &lt;code&gt;element&lt;/code&gt; is the child of a scrolling container.  (Scriptaculous, for instance, uses it whenever a Draggable&#8217;s container is scrollable.) For performance reasons, this method should not be used unless you need this specific edge case.&lt;/p&gt;

&lt;p&gt;You &lt;em&gt;must&lt;/em&gt; call &lt;a href=&quot;/api/position/prepare&quot;&gt;&lt;code&gt;Position.prepare&lt;/code&gt;&lt;/a&gt; first, since it calculates offsets that are used by this method.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:prototypejs.org,2006-11-02:12371</id>
    <published>2006-11-02T22:12:00Z</published>
    <updated>2007-11-08T01:02:57Z</updated>
    <category term="Position"/>
    <category term="deprecated"/>
    <link href="http://prototypejs.org/api/position/offsetparent" rel="alternate" type="text/html"/>
    <title>offsetParent</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;offsetParent(element) -&gt; HTMLElement&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns &lt;code&gt;element&lt;/code&gt;&#8217;s closest &lt;em&gt;positioned&lt;/em&gt; ancestor. If none is found, the &lt;code&gt;body&lt;/code&gt; element is returned.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;offsetParent(element) -&gt; HTMLElement&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns &lt;code&gt;element&lt;/code&gt;&#8217;s closest &lt;em&gt;positioned&lt;/em&gt; ancestor. If none is found, the &lt;code&gt;body&lt;/code&gt; element is returned.&lt;/p&gt;
&lt;p class=&quot;deprecated&quot;&gt;Deprecated in favor of &lt;a href=&quot;/api/element/getOffsetParent&quot;&gt;&lt;code&gt;Element#getoffsetparent &lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The returned element is &lt;code&gt;element&lt;/code&gt;&#8217;s &lt;a href=&quot;http://www.w3.org/TR/CSS21/visudet.html#containing-block-details&quot;&gt;CSS containing block&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:prototypejs.org,2006-11-02:12372</id>
    <published>2006-11-02T22:12:00Z</published>
    <updated>2007-12-23T16:15:39Z</updated>
    <category term="Position"/>
    <category term="deprecated"/>
    <link href="http://prototypejs.org/api/position/within" rel="alternate" type="text/html"/>
    <title>within</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;within(element, x, y) -&gt; Boolean&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Indicates whether the point &lt;code&gt;x, y&lt;/code&gt; (measured from the top-left corner of the document) is within the boundaries of &lt;code&gt;element&lt;/code&gt;.  Must be called immediately before &lt;a href=&quot;/api/position/overlap&quot;&gt;Position.overlap&lt;/a&gt;.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;within(element, x, y) -&gt; Boolean&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Indicates whether the point &lt;code&gt;x, y&lt;/code&gt; (measured from the top-left corner of the document) is within the boundaries of &lt;code&gt;element&lt;/code&gt;.  Must be called immediately before &lt;a href=&quot;/api/position/overlap&quot;&gt;Position.overlap&lt;/a&gt;.&lt;/p&gt;
&lt;p class=&quot;deprecated&quot;&gt;Deprecated.&lt;/p&gt;

&lt;p&gt;This function uses &lt;code&gt;Position.cumulativeOffset&lt;/code&gt; to determine &lt;code&gt;element&lt;/code&gt;&#8217;s offset from the top of the page, then combines those values with &lt;code&gt;element&lt;/code&gt;&#8217;s height and width to identify the offsets of all four corners of the element.  It then compares these coordinates to the &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; arguments, returning &lt;code&gt;true&lt;/code&gt; if those coordinates fall within the bounding box of &lt;code&gt;element&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;Example&lt;/h3&gt;

&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;
var element = $('some_positioned_element');
Position.cumulativeOffset(element);
// -&gt; [100, 100]  (item is 100px from the left and top edges of the page)
Element.getDimensions(element);
// -&gt; { width: 150, height: 150 }

Position.within(element, 200, 200);
// -&gt; true

Position.within(element, 260, 260);
// -&gt; false
&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:prototypejs.org,2006-11-02:12370</id>
    <published>2006-11-02T22:11:00Z</published>
    <updated>2008-10-27T15:02:05Z</updated>
    <category term="Position"/>
    <category term="deprecated"/>
    <link href="http://prototypejs.org/api/position/positionedoffset" rel="alternate" type="text/html"/>
    <title>positionedOffset</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;positionedOffset(element) -&gt; [Number, Number]&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Calculates the element&#8217;s offset relative to its closest positioned ancestor (i.e., the element that would be returned by &lt;a href=&quot;/api/position/offsetParent&quot;&gt;Position.offsetParent(element)&lt;/a&gt;.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;positionedOffset(element) -&gt; [Number, Number]&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Calculates the element&#8217;s offset relative to its closest positioned ancestor (i.e., the element that would be returned by &lt;a href=&quot;/api/position/offsetParent&quot;&gt;Position.offsetParent(element)&lt;/a&gt;.&lt;/p&gt;
&lt;p class=&quot;deprecated&quot;&gt;Deprecated in favor of &lt;a href=&quot;/api/element/positionedoffset&quot;&gt;&lt;code&gt;Element#positionedOffset &lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Calculates the cumulative &lt;code&gt;offsetLeft&lt;/code&gt; and &lt;code&gt;offsetTop&lt;/code&gt; of an element and all its parents &lt;em&gt;until&lt;/em&gt; it reaches an element with a position other than &lt;code&gt;static&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Note that all values are returned as &lt;em&gt;numbers only&lt;/em&gt; although they are &lt;em&gt;expressed in pixels&lt;/em&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:prototypejs.org,2006-11-02:12368</id>
    <published>2006-11-02T21:57:00Z</published>
    <updated>2007-11-08T00:53:06Z</updated>
    <category term="Position"/>
    <category term="deprecated"/>
    <link href="http://prototypejs.org/api/position/realoffset" rel="alternate" type="text/html"/>
    <title>realOffset</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;realOffset(element) -&gt; [Number, Number]&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Calculates the cumulative scroll offset of an element in nested scrolling containers.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;realOffset(element) -&gt; [Number, Number]&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Calculates the cumulative scroll offset of an element in nested scrolling containers.&lt;/p&gt;
&lt;p class=&quot;deprecated&quot;&gt;Deprecated in favor of &lt;a href=&quot;/api/element/cumulativescrolloffset&quot;&gt;&lt;code&gt;Element#cumulativeScrollOffset &lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Adds the cumulative &lt;code&gt;scrollLeft&lt;/code&gt; and &lt;code&gt;scrollTop&lt;/code&gt; of an element and all its parents.&lt;/p&gt;

&lt;p&gt;Used for calculating the scroll offset of an element that is in more than one scroll container (e.g., a draggable in a scrolling container which is itself part of a scrolling document).&lt;/p&gt;

&lt;p&gt;Note that all values are returned as &lt;em&gt;numbers only&lt;/em&gt; although they are &lt;em&gt;expressed in pixels&lt;/em&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:prototypejs.org,2006-11-02:12369</id>
    <published>2006-11-02T21:57:00Z</published>
    <updated>2007-11-08T00:43:38Z</updated>
    <category term="Position"/>
    <category term="deprecated"/>
    <link href="http://prototypejs.org/api/position/cumulativeoffset" rel="alternate" type="text/html"/>
    <title>cumulativeOffset</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;cumulativeOffset(element) -&gt; [Number, Number]&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns the offsets of &lt;code&gt;element&lt;/code&gt; from the top left corner of the document.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;cumulativeOffset(element) -&gt; [Number, Number]&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns the offsets of &lt;code&gt;element&lt;/code&gt; from the top left corner of the document.&lt;/p&gt;
&lt;p class=&quot;deprecated&quot;&gt;Deprecated in favor of &lt;a href=&quot;/api/element/cumulativeoffset&quot;&gt;&lt;code&gt;Element#cumulativeOffset &lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Adds the cumulative &lt;code&gt;offsetLeft&lt;/code&gt; and &lt;code&gt;offsetTop&lt;/code&gt; of an element and all its parents.&lt;/p&gt;

&lt;p&gt;Note that all values are returned as &lt;em&gt;numbers only&lt;/em&gt; although they are &lt;em&gt;expressed in pixels&lt;/em&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:prototypejs.org,2006-11-02:12367</id>
    <published>2006-11-02T21:54:00Z</published>
    <updated>2007-12-23T16:13:00Z</updated>
    <category term="Position"/>
    <category term="deprecated"/>
    <link href="http://prototypejs.org/api/position/prepare" rel="alternate" type="text/html"/>
    <title>prepare</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;prepare()&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Calculates document scroll offsets for use with &lt;a href=&quot;/api/position/withinIncludingScrolloffsets&quot;&gt;Position.withinIncludingScrolloffsets&lt;/a&gt;.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;prepare()&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Calculates document scroll offsets for use with &lt;a href=&quot;/api/position/withinIncludingScrolloffsets&quot;&gt;Position.withinIncludingScrolloffsets&lt;/a&gt;.&lt;/p&gt;
&lt;p class=&quot;deprecated&quot;&gt;Deprecated.&lt;/p&gt;
          </content>  </entry>
</feed>

