diff --git a/build/docs/style/style.css b/build/docs/style/style.css index 7c5554ec..f76e87ef 100644 --- a/build/docs/style/style.css +++ b/build/docs/style/style.css @@ -63,6 +63,7 @@ ul#docs { ul#docs li { margin: 5px 0; + width: 600px; } ul#docs li span.tooltip { @@ -95,6 +96,7 @@ ul#docs li div.short { color: #666; margin-left: 110px; margin-top: 5px; + width: 490px; } ul#docs span.fn { @@ -110,21 +112,26 @@ ul#docs li div.more { display: none; margin-left: 110px; margin-top: 5px; + width: 490px; } ul#docs li div.example { overflow: auto; + border-top: 1px solid #DDD; + margin-top: 15px; } ul#docs li div.example h5 { font-size: 16px; + margin: 10px 0 0 0; } ul#docs li div.example pre { - color: #4F4; - background: #000; + color: #000; + background: #EEE; padding: 5px; overflow: auto; + font-size: 0.8em; } p.raw { diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index f774658f..c3975e30 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -71,6 +71,108 @@ function jQuery(a,c) { // Map over the $ in case of overwrite if ( typeof $ != "undefined" ) jQuery._$ = $; + +/** + * This function accepts a string containing a CSS selector, + * basic XPath, or raw HTML, which is then used to match a set of elements. + * The HTML string is different from the traditional selectors in that + * it creates the DOM elements representing that HTML string, on the fly, + * to be (assumedly) inserted into the document later. + * + * The core functionality of jQuery centers around this function. + * Everything in jQuery is based upon this, or uses this in some way. + * The most basic use of this function is to pass in an expression + * (usually consisting of CSS or XPath), which then finds all matching + * elements and remembers them for later use. + * + * By default, $() looks for DOM elements within the context of the + * current HTML document. + * + * @example $("div > p") + * @desc This finds all p elements that are children of a div element. + * @before
one
two
three
+ * @result [two
] + * + * @example $("Hello
one
two
three
+ * @result [two
] + * + * @example $(document).ready( loaded ); + * @desc Executes the "loaded" function when the DOM is ready to + * be manipulated. + * + * @name $ + * @param DOMElement elem A DOM element to be encapsulated by a jQuery object. + * @cat Core + * @type jQuery + */ + +/** + * Wrap jQuery functionality around a set of DOM Elements. + * + * @example $( myForm.elements ).hide() + * @desc Hides all the input elements within a form + * + * @name $ + * @param Array