Skip to content

Commit

Permalink
* Pulling all docs changes from master (@fakedarren, see http://githu…
Browse files Browse the repository at this point in the history
  • Loading branch information
cpojer committed Mar 2, 2010
1 parent b8c6dc3 commit 3f18aa1
Show file tree
Hide file tree
Showing 19 changed files with 87 additions and 44 deletions.
2 changes: 1 addition & 1 deletion Docs/Class/Class.Extras.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ Class: Options {#Options}

A Utility Class. Its methods can be implemented with [Class:implement][] into any [Class][].
Used to automate the setting of a Class instance's options.
Will also add Class [Events](#Events) when the option property begins with 'on' and is followed by a capital letter (e.g. 'onComplete' adds a 'complete' event).
Will also add Class [Events](#Events) when the option property begins with 'on' and is followed by a capital letter (e.g. 'onComplete' adds a 'complete' event). You will need to call this.setOptions() for this to have an effect, however.

### Syntax:

Expand Down
1 change: 1 addition & 0 deletions Docs/Core/Core.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ Returns the type of object that matches the element passed in.
* 'collection' - (*string*) If object is a native htmlelements collection, such as childNodes, getElementsByTagName, etc.
* 'window' - (*string*) If object is the window object.
* 'document' - (*string*) If object is the document object.
* 'event' - (*string*) If object is an event.
* false - (*boolean*) If object is undefined, null, NaN or none of the above.

### Example:
Expand Down
24 changes: 20 additions & 4 deletions Docs/Element/Element.Dimensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Native: Element {#Element}

Custom Native to allow all of its methods to be used with any DOM element via the dollar function [$][].

### Note:
### Notes:

These methods don't take into consideration the body element margins and borders.
If you need margin/borders on the body, consider adding a wrapper div, but always reset the margin and borders of body to 0.
* These methods don't take into consideration the body element margins and borders. If you need margin/borders on the body, consider adding a wrapper div, but always reset the margin and borders of body to 0.
* If you need to measure the properties of elements that are not displayed (either their display style is none or one of their parents display style is none), you will need to use [Element.measure][] to expose it.

### Credits:

Expand Down Expand Up @@ -59,7 +59,9 @@ The following method is also available on the Window object.
var size = myElement.getSize();
alert("The element is "+size.x+" pixels wide and "+size.y+"pixels high.");

### Note:

If you need to measure the properties of elements that are not displayed (either their display style is none or one of their parents display style is none), you will need to use [Element.measure][] to expose it.


Element Method: getScrollSize {#Element:getScrollSize}
Expand All @@ -85,6 +87,9 @@ The following method is also available on the Window object.

- [MDC Element:scrollLeft][], [MDC Element:scrollTop][], [MDC Element:offsetWidth][], [MDC Element:offsetHeight][], [MDC Element:scrollWidth][], [MDC Element:scrollHeight][]

### Note:

If you need to measure the properties of elements that are not displayed (either their display style is none or one of their parents display style is none), you will need to use [Element.measure][] to expose it.


Element Method: getScroll {#Element:getScroll}
Expand All @@ -106,6 +111,9 @@ The following method is also available on the Window object.
var scroll = $('myElement').getScroll();
alert('My element is scrolled down ' + scroll.y + 'px'); //alerts 'My element is scrolled down to 620px'

### Note:

If you need to measure the properties of elements that are not displayed (either their display style is none or one of their parents display style is none), you will need to use [Element.measure][] to expose it.

Element Method: getPosition {#Element:getPosition}
--------------------------------------------------
Expand All @@ -132,6 +140,10 @@ relative - (Element, defaults to the document) If set, the position will be rela

- [QuirksMode: Find position](http://www.quirksmode.org/js/findpos.html)

### Note:

If you need to measure the properties of elements that are not displayed (either their display style is none or one of their parents display style is none), you will need to use [Element.measure][] to expose it.

Element Method: setPosition {#Element:setPosition}
--------------------------------------------------

Expand Down Expand Up @@ -189,6 +201,9 @@ relative - (*element*, optional) if set, the position will be relative to this e

[Element:getPosition](#Element:getPosition)

### Note:

If you need to measure the properties of elements that are not displayed (either their display style is none or one of their parents display style is none), you will need to use [Element.measure][] to expose it.

Element Method: getOffsetParent {#Element:getOffsetParent}
----------------------------------------------------------
Expand All @@ -209,4 +224,5 @@ Returns the parent of the element that is positioned, if there is one.
[MDC Element:offsetWidth]: http://developer.mozilla.org/en/docs/DOM:element.offsetWidth
[MDC Element:offsetHeight]: http://developer.mozilla.org/en/docs/DOM:element.offsetHeight
[MDC Element:scrollWidth]: http://developer.mozilla.org/en/docs/DOM:element.scrollWidth
[MDC Element:scrollHeight]: http://developer.mozilla.org/en/docs/DOM:element.scrollHeight
[MDC Element:scrollHeight]: http://developer.mozilla.org/en/docs/DOM:element.scrollHeight
[Element.measure]: /more/Element/Element.Measure
2 changes: 1 addition & 1 deletion Docs/Element/Element.Event.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,4 +322,4 @@ This event fires when the mouse wheel is rotated;
[Function]: /core/Native/Function
[Function:bind]: /core/Native/Function/#Function:bind
[Function:pass]: /core/Native/Function/#Function:pass
[Function:delay]: /core/Native/Function/#Function:delay
[Function:delay]: /core/Native/Function/#Function:delay
2 changes: 1 addition & 1 deletion Docs/Element/Element.Style.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ Returns an object of styles of the Element for each argument passed in.

[$]: /core/Element/Element/#dollar
[Function]: /core/Native/Function
[Element:getStyle]: #Element:getStyle
[Element:getStyle]: #Element:getStyle
2 changes: 1 addition & 1 deletion Docs/Element/Element.md
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ A text node will be created inside this Element, in either the top or bottom pos
### Arguments:

1. text - (*string*) The text to append.
1. where - (*string*, optional: default 'bottom') The position to inject the text to.
1. where - (*string*, optional: default 'bottom') The position to inject the text to. Values accepted are 'top', 'bottom', 'before' and 'after'.

### Returns:

Expand Down
2 changes: 1 addition & 1 deletion Docs/Fx/Fx.CSS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Has no public methods.

[Fx.Tween]: /core/Fx/Fx.Tween
[Fx.Morph]: /core/Fx/Fx.Morph
[Fx.Elements]: /more/Fx/Fx.Elements
[Fx.Elements]: /more/Fx/Fx.Elements
6 changes: 3 additions & 3 deletions Docs/Fx/Fx.Transitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ A collection of tweening transitions for use with the [Fx][] classes.

### Examples:

//Elastic.easeOut with default values:
var myFx = $('myElement').effect('margin', {transition: Fx.Transitions.Elastic.easeOut});
$('myElement').set('tween', {transition: Fx.Transitions.Elastic.easeOut});
$('myElement').tween('margin-top', 100);

### See also:

Expand Down Expand Up @@ -144,4 +144,4 @@ Returns an [Fx][] transition function with 'easeIn', 'easeOut', and 'easeInOut'
[Sine]: ../Docs/assets/images/Sine.png
[Back]: ../Docs/assets/images/Back.png
[Bounce]: ../Docs/assets/images/Bounce.png
[Elastic]: ../Docs/assets/images/Elastic.png
[Elastic]: ../Docs/assets/images/Elastic.png
26 changes: 13 additions & 13 deletions Docs/Native/Array.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ Accepts an object of key / function pairs to assign values.

var el = document.createElement('div');
var arr2 = [100, 'Hello', {foo: 'bar'}, el, false];
arr2.link({myNumber: Type.isNumber, myElement: Type.isElement, myObject: Type.isObject, myString: Type.isString, myBoolean: $defined});
arr2.link({myNumber: Number.type, myElement: Element.type, myObject: Object.type, myString: String.type, myBoolean: $defined});
//returns {myNumber: 100, myElement: el, myObject: {foo: 'bar'}, myString: 'Hello', myBoolean: false}


Expand Down Expand Up @@ -627,15 +627,15 @@ Creates a copy of an Array. Useful for applying the Array prototypes to iterable

[Array]: /core/Native/Array
[Function:bind]: /core/Native/Function/#Function:bind
[MDC Array]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array
[MDC Array:every]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:every
[MDC Array:filter]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:filter
[MDC Array:indexOf]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:indexOf
[MDC Array:map]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:map
[MDC Array:some]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:some
[MDC Array:forEach]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:forEach
[Array:every]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:every
[Array:filter]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:filter
[Array:indexOf]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:indexOf
[Array:map]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:map
[Array:some]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:some
[MDC Array]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array
[MDC Array:every]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/every
[MDC Array:filter]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/filter
[MDC Array:indexOf]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/indexOf
[MDC Array:map]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/map
[MDC Array:some]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/some
[MDC Array:forEach]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/forEach
[Array:every]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/every
[Array:filter]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/filter
[Array:indexOf]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/indexOf
[Array:map]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/map
[Array:some]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/some
4 changes: 2 additions & 2 deletions Docs/Native/Event.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Event Method: constructor {#Event:constructor}

### Arguments:

1. event - (*event*) An HTMLEvent Object.
1. event - (*event*, required) An HTMLEvent Object.
2. win - (*window*, optional: defaults to window) The context of the event.

#### Properties:
Expand Down Expand Up @@ -177,4 +177,4 @@ Additional Event key codes can be added by adding properties to the Event.Keys H
[Function]: /core/Native/Function
[Function:bind]: /core/Native/Function/#Function:bind
[Function:pass]: /core/Native/Function/#Function:pass
[Function:delay]: /core/Native/Function/#Function:delay
[Function:delay]: /core/Native/Function/#Function:delay
6 changes: 3 additions & 3 deletions Docs/Native/Function.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,6 @@ Runs the Function with specified arguments and binding. The same as apply but re
[options]: #Function:create:options
[Element:addEvent]: /core/Element/Element.Event/#Element:addEvent
[$clear]: /core/Core/Core/#clear
[MDC Function]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Function
[MDC setInterval]: http://developer.mozilla.org/en/docs/DOM:window.setInterval
[MDC setTimeout]: http://developer.mozilla.org/en/docs/DOM:window.setTimeout
[MDC Function]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function
[MDC setInterval]: https://developer.mozilla.org/en/DOM/window.setInterval
[MDC setTimeout]: https://developer.mozilla.org/en/DOM/window.setTimeout
2 changes: 1 addition & 1 deletion Docs/Native/Number.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ Returns this number as another number with the passed in base. Useful because to



[MDC Number]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Number
[MDC Number]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number
14 changes: 7 additions & 7 deletions Docs/Native/String.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,11 @@ Removes undefined keywords and ignores escaped keywords.



[MDC String]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:String
[MDC Regexp:test]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:RegExp:test
[MDC Regular Expressions]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Regular_Expressions
[MDC parseInt]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Functions:parseInt
[MDC parseFloat]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Functions:parseFloat
[MDC Array]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array
[MDC String]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String
[MDC Regexp:test]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/RegExp/test
[MDC Regular Expressions]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Regular_Expressions
[MDC parseInt]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Functions/parseInt
[MDC parseFloat]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Functions/parseFloat
[MDC Array]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array
[String:trim]: #String:trim
[Array:rgbToHex]: /core/Native/Array/#Array:rgbToHex
[Array:rgbToHex]: /core/Native/Array/#Array:rgbToHex
1 change: 1 addition & 0 deletions Docs/Request/Request.HTML.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Request Specifically made for receiving HTML.

* evalScripts - (*boolean*: defaults to true) If set to true, `script` tags inside the response will be evaluated. This overrides the `false` default from Request.
* update - (*element*: defaults to null) The Element to insert the response text of the Request into upon completion of the request.
* append - (*element*: defaults to null) The Element to append the response text of the Request into upon completion of the request.

### Events:

Expand Down
4 changes: 2 additions & 2 deletions Docs/Utilities/Cookie.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ Remove a Cookie:
Creating a Cookie and Removing it Right Away:

var myCookie = Cookie.write('username', 'Aaron', {domain: 'mootools.net'});
if (Cookie.read('username') == 'Aaron') { Cookie.dispose(myCookie); }
if (Cookie.read('username') == 'Aaron') { myCookie.dispose(); }



[Cookie]: #Cookie
[Cookie.options]: #Cookie-options
[Cookie.options.domain]: #Cookie-options
[QuirksMode]: http://www.quirksmode.org
[QuirksMode]: http://www.quirksmode.org
2 changes: 1 addition & 1 deletion Docs/Utilities/DomReady.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ This event is only available to the window Element.
### See Also:
[Element.Event][]

[Element.Event]: /core/Element/Element.Event
[Element.Event]: /core/Element/Element.Event
27 changes: 26 additions & 1 deletion Docs/Utilities/Selectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Some default Pseudo Selectors for [Selectors][].
- [W3C Pseudo Classes](http://www.w3.org/TR/2005/WD-css3-selectors-20051215/#pseudo-classes)


Selector: enabled {#Selector:checked}
Selector: checked {#Selector:checked}
-------------------------------------

Matches all Elements that are checked.
Expand Down Expand Up @@ -121,6 +121,7 @@ Matches all Elements that are enabled.
$$('*:enabled')

$('myElement').getElements(':enabled');


Selector: empty {#Selector:empty}
---------------------------------
Expand All @@ -135,6 +136,7 @@ Matches all elements which are empty.

$$('div:empty');


Selector: contains {#Selector:contains}
---------------------------------------

Expand All @@ -153,6 +155,26 @@ Matches all the Elements which contains the text.
$$('p:contains("find me")');


Selector: not {#Selector:not}
-------------------------------------

Matches all elements that do not match the single selector.

### Usage:

':not(selector)'

### Examples:

$$(':not(div.foo)'); // all elements except divs with class 'foo'

$$('input:not([type="submit"])'); // all inputs except submit buttons

myElement.getElements(':not(a)');

$$(':not(ul li)'); // NOT allowed! Only single selectors might be passed.


Selector: nth-child {#Selector:nth-child}
-----------------------------------------

Expand Down Expand Up @@ -203,6 +225,7 @@ Last Child:

This selector respects the w3c specifications, so it has 1 as its first child, not 0. Therefore nth-child(odd) will actually select the even children, if you think in zero-based indexes.


Selector: even {#Selector:even}
-------------------------------

Expand All @@ -220,6 +243,7 @@ Matches every even child.

This selector is not part of the w3c specification, therefore its index starts at 0. This selector is highly recommended over nth-child(even), as this will return the real even children.


Selector: odd {#Selector:odd}
-----------------------------

Expand All @@ -237,6 +261,7 @@ Matches every odd child.

This selector is not part of the w3c specification, therefore its index starts at 0. This selector is highly recommended over nth-child(odd), as this will return the real odd children.


Selector: first-child {#Selector:first-child}
---------------------------------

Expand Down
2 changes: 1 addition & 1 deletion Docs/Utilities/Swiff.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ Calls an ActionScript function from JavaScript.
The SWF file must be compiled with the ExternalInterface component. See the Adobe documentation on [External Interface][] for more information.

[SWFObject]: http://blog.deconcept.com/swfobject/
[External Interface]: http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001652.html
[External Interface]: http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001652.html
2 changes: 1 addition & 1 deletion Docs/license.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Attribution-NonCommercial-ShareAlike 3.0

## See Also

<http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
<http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

0 comments on commit 3f18aa1

Please sign in to comment.