Differences from version 3 to 7



@@ -3,9 +3,7 @@

 
 These functions are great for changing text on a page, monitoring changes made to forms, and adding and removing addition page parts.
 
-
-
-
+Also see the PrototypeUtilityFunctions, some of which are handy to use when manipulating Elements.
 
 
 

@@ -135,6 +133,19 @@

 {code source=JavaScript}
 <br>Hello, <span id="person" style="color:red;">Wiggum. How is it going?</span> Are you there?
 {/code}
+
+!!The Position object (preliminary documentation)
+
+This object provides a host of functions that help when working with element positioning.
+
+||Method | Kind | Arguments | Description
+prepare() | instance | (none) | Adjusts the deltaX and deltaY properties to accommodate changes in the scroll position. Remember to call this method before any calls to withinIncludingScrolloffset after the page scrolls.
+realOffset(element) | instance | element: object | Returns an Array with the correct scroll offsets of the element, including any scroll offsets that affect the element. The resulting array is similar to [total_scroll_left, total_scroll_top]
+cumulativeOffset(element) | instance | element: object | Returns an Array with the correct positioning offsets of the element, including any offsets that are imposed by positioned parent elements. The resulting array is similar to [total_offset_left, total_offset_top]
+within(element, x, y) | instance | element: object, x and y: coordinates of a point | Tests if the given point coordinates are inside the bounding rectangle of the given element
+withinIncludingScrolloffsets(element, x, y) | instance | element: object, x and y: coordinates of a point | &nbsp;
+overlap(mode, element) | instance | mode: 'vertical' or 'horizontal', element: object | within() needs to be called right before calling this method. This method will return a decimal number between 0.0 and 1.0 representing the fraction of the coordinate that overlaps on the element. As an example, if the element is a square DIV with a 100px side and positioned at (300, 300), then within(divSquare, 330, 330); overlap('vertical', divSquare); should return 0.10, meaning that the point is at the 10% (30px) mark from the top border of the DIV.
+clone(source, target) | instance | source: element object or id, target: element object or id | Resizes and repositions the target element identically to the source element.||
 
 
 !Form and Field Element Manipulation

@@ -258,18 +269,5 @@

 ||Method | Kind | Arguments | Description
 [ctor](form, callback) | constructor | form: form object or id, callback: function to be called when any data entry element in the form changes | Inherited from [#Abstract.EventObserver | Abstract.EventObserver]. Creates an object that will monitor the form for changes.
 getValue() | instance | (none) | Returns the serialization of all form's data.||
-
-!!The Position object (preliminary documentation)
-
-This object provides a host of functions that help when working with element positioning.
-
-||Method | Kind | Arguments | Description
-prepare() | instance | (none) | Adjusts the deltaX and deltaY properties to accommodate changes in the scroll position. Remember to call this method before any calls to withinIncludingScrolloffset after the page scrolls.
-realOffset(element) | instance | element: object | Returns an Array with the correct scroll offsets of the element, including any scroll offsets that affect the element. The resulting array is similar to [total_scroll_left, total_scroll_top]
-cumulativeOffset(element) | instance | element: object | Returns an Array with the correct positioning offsets of the element, including any offsets that are imposed by positioned parent elements. The resulting array is similar to [total_offset_left, total_offset_top]
-within(element, x, y) | instance | element: object, x and y: coordinates of a point | Tests if the given point coordinates are inside the bounding rectangle of the given element
-withinIncludingScrolloffsets(element, x, y) | instance | element: object, x and y: coordinates of a point | &nbsp;
-overlap(mode, element) | instance | mode: 'vertical' or 'horizontal', element: object | within() needs to be called right before calling this method. This method will return a decimal number between 0.0 and 1.0 representing the fraction of the coordinate that overlaps on the element. As an example, if the element is a square DIV with a 100px side and positioned at (300, 300), then within(divSquare, 330, 330); overlap('vertical', divSquare); should return 0.10, meaning that the point is at the 10% (30px) mark from the top border of the DIV.
-clone(source, target) | instance | source: element object or id, target: element object or id | Resizes and repositions the target element identically to the source element.||
 
 
Page History
Date/CommentUserIPVersion
27 Dec 2005 (18:09 UTC)
Will68.174.96.1017
Current • Source
xing194.152.164.456
View • Compare • Difference • Source
Will68.174.96.1015
View • Compare • Difference • Source
Will68.174.96.1014
View • Compare • Difference • Source
Will68.174.96.1013
View • Compare • Difference • Source
Will68.174.96.1012
View • Compare • Difference • Source
Will68.174.96.1011
View • Compare • Difference • Source