Skip to content

Commit 5ba3fe2

Browse files
committed
changed type="Object" to type="PlainObject"
cleaned up formatting of entries through slideUp
1 parent ba2b785 commit 5ba3fe2

File tree

114 files changed

+2824
-2797
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+2824
-2797
lines changed

entries/jQuery.Callbacks.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<desc>A multi-purpose callbacks list object that provides a powerful way to manage callback lists.</desc>
99
<longdesc>
1010

11-
<p>The <code>$.Callbacks()</code> function is internally used to provide the base functionality behind the jQuery <code>$.ajax()</code> and <code>$.Deferred()</code> components. It can be used as a similar base to define functionality for new components.</p>
12-
<p><code>$.Callbacks()</code> support a number of methods including <code><a href="/callbacks.add/">callbacks.add()</a></code>,<code><a href="/callbacks.remove/">callbacks.remove()</a></code>, <code><a href="/callbacks.fire/">callbacks.fire()</a></code> and <code><a href="/callbacks.disable/">callbacks.disable()</a></code>.</p>
13-
<h3 id="getting-started">Getting started</h3>
11+
<p>The <code>$.Callbacks()</code> function is internally used to provide the base functionality behind the jQuery <code>$.ajax()</code> and <code>$.Deferred()</code> components. It can be used as a similar base to define functionality for new components.</p>
12+
<p><code>$.Callbacks()</code> support a number of methods including <code><a href="/callbacks.add/">callbacks.add()</a></code>,<code><a href="/callbacks.remove/">callbacks.remove()</a></code>, <code><a href="/callbacks.fire/">callbacks.fire()</a></code> and <code><a href="/callbacks.disable/">callbacks.disable()</a></code>.</p>
13+
<h3 id="getting-started">Getting started</h3>
1414

15-
<p>The following are two sample methods named <code>fn1</code> and <code>fn2</code>:</p>
16-
<pre>
15+
<p>The following are two sample methods named <code>fn1</code> and <code>fn2</code>:</p>
16+
<pre>
1717
function fn1( value ){
1818
console.log( value );
1919
}

entries/jQuery.browser.xml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@
44
<longdesc>
55
<p>The <code>$.browser</code> property provides information about the web browser that is accessing the page, as reported by the browser itself. It contains flags for each of the four most prevalent browser classes (Internet Explorer, Mozilla, Webkit, and Opera) as well as version information.</p>
66

7-
<p>Available flags are:</p>
8-
<ul>
9-
<li>webkit (as of jQuery 1.4)</li>
10-
<li>safari (deprecated)</li>
11-
<li>opera</li>
12-
<li>msie</li>
13-
<li>mozilla</li>
14-
</ul>
7+
<p>Available flags are:</p>
8+
<ul>
9+
<li>webkit (as of jQuery 1.4)</li>
10+
<li>safari (deprecated)</li>
11+
<li>opera</li>
12+
<li>msie</li>
13+
<li>mozilla</li>
14+
</ul>
1515

16-
<p>This property is available immediately. It is therefore safe to use it to determine whether or not to call <code>$(document).ready()</code>.
17-
The <code>$.browser</code> property is deprecated in jQuery 1.3, and its functionality may be moved to a team-supported plugin in a future release of jQuery.</p>
16+
<p>This property is available immediately. It is therefore safe to use it to determine whether or not to call <code>$(document).ready()</code>.
17+
The <code>$.browser</code> property is deprecated in jQuery 1.3, and its functionality may be moved to a team-supported plugin in a future release of jQuery.</p>
1818

19-
<p>Because <code>$.browser</code> uses <code>navigator.userAgent</code> to determine the platform, it is vulnerable to spoofing by the user or misrepresentation by the browser itself. It is always best to avoid browser-specific code entirely where possible. The <code><a href="http://api.jquery.com/jQuery.support/">$.support</a></code> property is available for detection of support for particular features rather than relying on <code>$.browser</code>. </p></longdesc>
19+
<p>Because <code>$.browser</code> uses <code>navigator.userAgent</code> to determine the platform, it is vulnerable to spoofing by the user or misrepresentation by the browser itself. It is always best to avoid browser-specific code entirely where possible. The <code><a href="http://api.jquery.com/jQuery.support/">$.support</a></code> property is available for detection of support for particular features rather than relying on <code>$.browser</code>. </p>
20+
</longdesc>
2021
<example>
2122
<desc>Show the browser info.</desc>
2223
<code><![CDATA[

entries/jQuery.contains.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<desc>Check if an element is inside another. Text and comment nodes are not supported.</desc>
1717
<code><![CDATA[jQuery.contains(document.documentElement, document.body); // true
1818
jQuery.contains(document.body, document.documentElement); // false]]></code>
19-
</example>
20-
<category name="Utilities" slug="utilities"/>
19+
</example>
20+
<category name="Utilities" slug="utilities"/>
2121
<category name="Version 1.4" slug="1.4"/>
2222
</entry>

entries/jQuery.fx.interval.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ $("input").click(function(){
1717
$("div").toggle( 3000 );
1818
});
1919
]]></code>
20-
<css><![CDATA[
21-
div { width:50px; height:30px; margin:5px; float:left;
22-
background:green; }
23-
]]></css>
24-
<html><![CDATA[<p><input type="button" value="Run"/></p>
20+
<css><![CDATA[
21+
div { width:50px; height:30px; margin:5px; float:left;
22+
background:green; }
23+
]]></css>
24+
<html><![CDATA[<p><input type="button" value="Run"/></p>
2525
<div></div>]]></html>
2626
</example>
2727
<category name="Custom" slug="custom-effects"/>

entries/jQuery.fx.off.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
</ul>
1212
<p>Animations can be turned back on by setting the property to <code>false</code>.</p>
1313
</longdesc>
14-
<example>
15-
<desc>Toggle animation on and off</desc>
16-
<code><![CDATA[
14+
<example>
15+
<desc>Toggle animation on and off</desc>
16+
<code><![CDATA[
1717
var toggleFx = function() {
1818
$.fx.off = !$.fx.off;
1919
};
@@ -25,13 +25,13 @@ $("input").click(function(){
2525
$("div").toggle("slow");
2626
});
2727
]]></code>
28-
<css><![CDATA[
28+
<css><![CDATA[
2929
div { width:50px; height:30px; margin:5px; float:left;
3030
background:green; }
31-
]]></css>
32-
<html><![CDATA[<p><input type="button" value="Run"/> <button>Toggle fx</button></p>
31+
]]></css>
32+
<html><![CDATA[<p><input type="button" value="Run"/> <button>Toggle fx</button></p>
3333
<div></div>]]></html>
34-
</example>
34+
</example>
3535
<category name="Custom" slug="custom-effects"/>
3636
<category name="Properties of the Global jQuery Object" slug="global-jquery-object-properties"/>
3737
<category name="Version 1.3" slug="1.3"/>

entries/jQuery.getJSON.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<desc>Load JSON-encoded data from the server using a GET HTTP request.</desc>
1515
<longdesc>
1616
<p>This is a shorthand Ajax function, which is equivalent to:</p>
17-
<pre>$.ajax({
17+
<pre>$.ajax({
1818
url: <em>url</em>,
1919
dataType: 'json',
2020
data: <em>data</em>,

entries/jQuery.getScript.xml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,30 @@
1616
success: <em>success</em>
1717
});
1818
</pre>
19-
<p>The script is executed in the global context, so it can refer to other variables and use jQuery functions. Included scripts can have some impact on the current page.</p>
20-
<h4 id="success-callback">
21-
Success Callback
22-
</h4>
23-
<p>The callback is passed the returned JavaScript file. This is generally not useful as the script will already have run at this point.</p>
24-
<pre>$(".result").html("&lt;p&gt;Lorem ipsum dolor sit amet.&lt;/p&gt;");</pre>
25-
<p>Scripts are included and run by referencing the file name:</p>
19+
<p>The script is executed in the global context, so it can refer to other variables and use jQuery functions. Included scripts can have some impact on the current page.</p>
20+
<h4 id="success-callback">
21+
Success Callback
22+
</h4>
23+
<p>The callback is passed the returned JavaScript file. This is generally not useful as the script will already have run at this point.</p>
24+
<pre>$(".result").html("&lt;p&gt;Lorem ipsum dolor sit amet.&lt;/p&gt;");</pre>
25+
<p>Scripts are included and run by referencing the file name:</p>
2626
<pre>$.getScript("ajax/test.js", function(data, textStatus, jqxhr) {
2727
console.log(data); //data returned
2828
console.log(textStatus); //success
2929
console.log(jqxhr.status); //200
3030
console.log('Load was performed.');
3131
});</pre>
3232

33-
<h4 id="handling-errors">Handling Errors</h4>
34-
<p>As of jQuery 1.5, you may use <a href="http://api.jquery.com/deferred.fail/"><code>.fail()</code></a> to account for errors:</p>
33+
<h4 id="handling-errors">Handling Errors</h4>
34+
<p>As of jQuery 1.5, you may use <a href="http://api.jquery.com/deferred.fail/"><code>.fail()</code></a> to account for errors:</p>
3535
<pre>
3636
$.getScript("ajax/test.js")
3737
.done(function(script, textStatus) {
3838
console.log( textStatus );
3939
})
4040
.fail(function(jqxhr, settings, exception) {
4141
$( "div.log" ).text( "Triggered ajaxError handler." );
42-
});
42+
});
4343
</pre>
4444
<p>Prior to jQuery 1.5, the global <code>.ajaxError()</code> callback event had to be used in order to handle <code>$.getScript()</code> errors:</p>
4545
<pre>
@@ -49,15 +49,15 @@ $( "div.log" ).ajaxError(function(e, jqxhr, settings, exception) {
4949
}
5050
});
5151
</pre>
52-
<h4 id="caching-requests">Caching Responses</h4>
53-
<p>Be default, <code>$.getScript()</code> sets the cache setting to <code>false</code>. This appends a timestamped query parameter to the request URL to ensure that the browser downloads the script each time it is requested. You can override this feature by setting the cache property globally using <a href="http://api.jquery.com/jquery.ajaxsetup/"><code>$.ajaxSetup()</code></a>: </p>
52+
<h4 id="caching-requests">Caching Responses</h4>
53+
<p>Be default, <code>$.getScript()</code> sets the cache setting to <code>false</code>. This appends a timestamped query parameter to the request URL to ensure that the browser downloads the script each time it is requested. You can override this feature by setting the cache property globally using <a href="http://api.jquery.com/jquery.ajaxsetup/"><code>$.ajaxSetup()</code></a>: </p>
5454
<pre>
5555
$.ajaxSetup({
5656
cache: true
5757
});
5858
</pre>
59-
<p>Alternatively, you could define a new method that uses the more flexible <code>$.ajax()</code> method.</p>
60-
</longdesc>
59+
<p>Alternatively, you could define a new method that uses the more flexible <code>$.ajax()</code> method.</p>
60+
</longdesc>
6161
<example>
6262
<desc>Define a $.cachedScript() method that allows fetching a cached script:</desc>
6363
<code>jQuery.cachedScript = function(url, options) {
@@ -80,9 +80,9 @@ $.cachedScript("ajax/test.js").done(function(script, textStatus) {
8080
});
8181
</code>
8282
</example>
83-
<example>
84-
<desc>Load the <a href="http://github.com/jquery/jquery-color">official jQuery Color Animation plugin</a> dynamically and bind some color animations to occur once the new functionality is loaded.</desc>
85-
<code><![CDATA[
83+
<example>
84+
<desc>Load the <a href="http://github.com/jquery/jquery-color">official jQuery Color Animation plugin</a> dynamically and bind some color animations to occur once the new functionality is loaded.</desc>
85+
<code><![CDATA[
8686
$.getScript("/scripts/jquery.color.js", function() {
8787
$("#go").click(function(){
8888
$(".block").animate( { backgroundColor: "pink" }, 1000)

entries/jQuery.globalEval.xml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
<entry type='method' name="jQuery.globalEval" return="">
2-
<signature>
3-
<added>1.0.4</added>
4-
<argument name="code" type="String">
5-
<desc>The JavaScript code to execute.</desc>
6-
</argument>
7-
</signature>
8-
<desc>Execute some JavaScript code globally.</desc>
9-
<longdesc><p>This method behaves differently from using a normal JavaScript <code>eval()</code> in that it's executed within the global context (which is important for loading external scripts dynamically).</p></longdesc>
10-
<example>
11-
<desc>Execute a script in the global context.</desc>
12-
<code><![CDATA[function test(){
1+
<entry type='method' name="jQuery.globalEval" return="">
2+
<signature>
3+
<added>1.0.4</added>
4+
<argument name="code" type="String">
5+
<desc>The JavaScript code to execute.</desc>
6+
</argument>
7+
</signature>
8+
<desc>Execute some JavaScript code globally.</desc>
9+
<longdesc>
10+
<p>This method behaves differently from using a normal JavaScript <code>eval()</code> in that it's executed within the global context (which is important for loading external scripts dynamically).</p>
11+
</longdesc>
12+
<example>
13+
<desc>Execute a script in the global context.</desc>
14+
<code><![CDATA[function test(){
1315
jQuery.globalEval("var newVar = true;")
14-
}
15-
test();
16-
// newVar === true]]></code>
17-
</example>
18-
<category name="Utilities" slug="utilities"/>
16+
}
17+
test();
18+
// newVar === true
19+
]]></code>
20+
</example>
21+
<category name="Utilities" slug="utilities"/>
1922
<category name="Version 1.0.4" slug="1.0.4"/>
2023
</entry>

entries/jQuery.hasData.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
</signature>
88
<desc>Determine whether an element has any jQuery data associated with it.</desc>
99
<longdesc><p>The <code>jQuery.hasData()</code> method provides a way to determine if an element currently has any values that were set using <code><a href='/jQuery.data'>jQuery.data()</a></code>. If no data is associated with an element (there is no data object at all or the data object is empty), the method returns <code>false</code>; otherwise it returns <code>true</code>.</p>
10-
<p>The primary advantage of <code>jQuery.hasData(element)</code> is that it does not create and associate a data object with the element if none currently exists. In contrast, <code>jQuery.data(element)</code> always returns a data object to the caller, creating one if no data object previously existed.
10+
<p>The primary advantage of <code>jQuery.hasData(element)</code> is that it does not create and associate a data object with the element if none currently exists. In contrast, <code>jQuery.data(element)</code> always returns a data object to the caller, creating one if no data object previously existed.
1111
</p>
12-
<p>Note that jQuery's event system uses the jQuery data API to store event handlers. Therefore, binding an event to an element using <code>.on()</code>, <code>.bind()</code>, <code>.live()</code>, <code>.delegate()</code>, or one of the shorthand event methods also associates a data object with that element.
12+
<p>Note that jQuery's event system uses the jQuery data API to store event handlers. Therefore, binding an event to an element using <code>.on()</code>, <code>.bind()</code>, <code>.live()</code>, <code>.delegate()</code>, or one of the shorthand event methods also associates a data object with that element.
1313
</p>
14-
</longdesc>
14+
</longdesc>
1515
<example>
1616
<desc>Set data on an element and see the results of hasData.</desc>
1717
<code><![CDATA[

entries/jQuery.holdReady.xml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
<entry type='method' name="jQuery.holdReady" return="undefined">
22
<desc>Holds or releases the execution of jQuery's ready event.</desc>
3-
<signature>
4-
<added>1.6</added>
5-
<argument name="hold" type="Boolean">
6-
<desc>Indicates whether the ready hold is being requested or released</desc>
7-
</argument>
8-
</signature>
9-
10-
<longdesc>
11-
<p>The <code>$.holdReady()</code> method allows the caller to delay jQuery's ready event. This <em>advanced feature</em> would typically be used by dynamic script loaders that want to load additional JavaScript such as jQuery plugins before allowing the ready event to occur, even though the DOM may be ready. This method must be called early in the document, such as in the <code>&lt;head&gt;</code> immediately after the jQuery script tag. Calling this method after the ready event has already fired will have no effect. </p>
12-
<p>To delay the ready event, first call <code>$.holdReady(true)</code>. When the ready event should be released to execute, call <code>$.holdReady(false)</code>. Note that multiple holds can be put on the ready event, one for each <code>$.holdReady(true)</code> call. The ready event will not actually fire until all holds have been released with a corresponding number of <code>$.holdReady(false)</code> calls <em>and</em> the normal document ready conditions are met. (See <a href="http://api.jquery.com/ready/"><code>ready</code></a> for more information.)</p>
13-
</longdesc>
3+
<signature>
4+
<added>1.6</added>
5+
<argument name="hold" type="Boolean">
6+
<desc>Indicates whether the ready hold is being requested or released</desc>
7+
</argument>
8+
</signature>
9+
<longdesc>
10+
<p>The <code>$.holdReady()</code> method allows the caller to delay jQuery's ready event. This <em>advanced feature</em> would typically be used by dynamic script loaders that want to load additional JavaScript such as jQuery plugins before allowing the ready event to occur, even though the DOM may be ready. This method must be called early in the document, such as in the <code>&lt;head&gt;</code> immediately after the jQuery script tag. Calling this method after the ready event has already fired will have no effect. </p>
11+
<p>To delay the ready event, first call <code>$.holdReady(true)</code>. When the ready event should be released to execute, call <code>$.holdReady(false)</code>. Note that multiple holds can be put on the ready event, one for each <code>$.holdReady(true)</code> call. The ready event will not actually fire until all holds have been released with a corresponding number of <code>$.holdReady(false)</code> calls <em>and</em> the normal document ready conditions are met. (See <a href="http://api.jquery.com/ready/"><code>ready</code></a> for more information.)</p>
12+
</longdesc>
1413
<example>
15-
<desc>Delay the ready event until a custom plugin has loaded.</desc>
16-
<code><![CDATA[
14+
<desc>Delay the ready event until a custom plugin has loaded.</desc>
15+
<code><![CDATA[
1716
$.holdReady(true);
1817
$.getScript("myplugin.js", function() {
19-
$.holdReady(false);
18+
$.holdReady(false);
2019
});
2120
]]></code>
2221
</example>

entries/jQuery.inArray.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<entry type='method' name="jQuery.inArray" return="Number">
2-
<signature><added>1.2</added>
2+
<signature>
3+
<added>1.2</added>
34
<argument name="value" type="Any">
45
<desc>The value to search for.</desc>
56
</argument>
@@ -10,12 +11,11 @@
1011
<desc>The index of the array at which to begin the search. The default is 0, which will search the whole array.</desc>
1112
</argument>
1213
</signature>
13-
<desc>Search for a specified value within an array and return its index (or -1 if not found).</desc>
14-
<longdesc><p>The <code>$.inArray()</code> method is similar to JavaScript's native <code>.indexOf()</code> method in that it returns -1 when it doesn't find a match. If the first element within the array matches <code>value</code>, <code>$.inArray()</code> returns 0.</p>
15-
14+
<desc>Search for a specified value within an array and return its index (or -1 if not found).</desc>
15+
<longdesc><p>The <code>$.inArray()</code> method is similar to JavaScript's native <code>.indexOf()</code> method in that it returns -1 when it doesn't find a match. If the first element within the array matches <code>value</code>, <code>$.inArray()</code> returns 0.</p>
1616
<p>Because JavaScript treats 0 as loosely equal to false (i.e. 0 == false, but 0 !== false), if we're checking for the presence of <code>value</code> within <code>array</code>, we need to check if it's not equal to (or greater than) -1.</p>
1717
</longdesc>
18-
18+
1919
<example>
2020
<desc>Report the index of some elements in the array.</desc>
2121
<code><![CDATA[var arr = [ 4, "Pete", 8, "John" ];

0 commit comments

Comments
 (0)