Skip to content

Commit 437d3fc

Browse files
committed
Cleanup.
1 parent 4883288 commit 437d3fc

Some content is hidden

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

100 files changed

+689
-582
lines changed

entries/animate.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ $( "#clickme" ).click(function() {
6666
<p>The <code>opacity</code> of the image is already at its target value, so this property is not animated by the second click. Since the target value for <code>left</code> is a relative value, the image moves even farther to the right during this second animation.</p>
6767
<p>Directional properties (<code>top</code>, <code>right</code>, <code>bottom</code>, <code>left</code>) have no discernible effect on elements if their <code>position</code> style property is <code>static</code>, which it is by default.</p>
6868
<div class="warning">
69-
<p><strong>Note: </strong>The <a href="http://jqueryui.com">jQuery UI</a> project extends the <code>.animate()</code> method by allowing some non-numeric styles such as colors to be animated. The project also includes mechanisms for specifying animations through CSS classes rather than individual attributes.</p>
69+
<p><strong>Note: </strong>The <a href="http://jqueryui.com/">jQuery UI</a> project extends the <code>.animate()</code> method by allowing some non-numeric styles such as colors to be animated. The project also includes mechanisms for specifying animations through CSS classes rather than individual attributes.</p>
7070
</div>
7171
<div class="warning">
7272
<p><strong>Note:</strong> if attempting to animate an element with a height or width of 0px, where contents of the element are visible due to overflow, jQuery may clip this overflow during animation. By fixing the dimensions of the original element being hidden however, it is possible to ensure that the animation runs smoothly. A <a href="http://www.google.com/search?q=clearfix">clearfix</a> can be used to automatically fix the dimensions of your main element without the need to set this manually.</p>

entries/focusin.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
</signature>
2020
<longdesc>
2121
<p>This method is a shortcut for <code>.on('focusin', handler)</code>.</p>
22-
<p>The <code>focusin</code> event is sent to an element when it, or any element inside of it, gains focus. This is distinct from the <a href="/focus">focus</a> event in that it supports detecting the focus event on parent elements (in other words, it supports event bubbling).</p>
23-
<p>This event will likely be used together with the <a href="/focusout">focusout</a> event.</p>
22+
<p>The <code>focusin</code> event is sent to an element when it, or any element inside of it, gains focus. This is distinct from the <a href="/focus/">focus</a> event in that it supports detecting the focus event on parent elements (in other words, it supports event bubbling).</p>
23+
<p>This event will likely be used together with the <a href="/focusout/">focusout</a> event.</p>
2424
</longdesc>
2525
<example>
2626
<desc>Watch for a focus to occur within the paragraphs on the page.</desc>

entries/jQuery.Callbacks.xml

+5-6
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ foobar
106106
var callbacks = $.Callbacks( "unique" );
107107
callbacks.add( fn1 );
108108
callbacks.fire( "foo" );
109-
callbacks.add( fn1 ); // repeat addition
109+
callbacks.add( fn1 ); // Repeat addition
110110
callbacks.add( fn2 );
111111
callbacks.fire( "bar" );
112112
callbacks.remove( fn2 );
@@ -122,12 +122,12 @@ foobar
122122
</code></pre>
123123
<h2 id="stopOnFalse"><code>$.Callbacks( "stopOnFalse" )</code>:</h2>
124124
<pre><code>
125-
function fn1( value ){
125+
function fn1( value ) {
126126
console.log( value );
127127
return false;
128128
}
129129

130-
function fn2( value ){
130+
function fn2( value ) {
131131
fn1( "fn2 says: " + value );
132132
return false;
133133
}
@@ -163,7 +163,7 @@ function fn2( value ) {
163163
var callbacks = $.Callbacks( "unique memory" );
164164
callbacks.add( fn1 );
165165
callbacks.fire( "foo" );
166-
callbacks.add( fn1 ); // repeat addition
166+
callbacks.add( fn1 ); // Repeat addition
167167
callbacks.add( fn2 );
168168
callbacks.fire( "bar" );
169169
callbacks.add( fn2 );
@@ -201,8 +201,7 @@ remove( fn1 );
201201
var topics = {};
202202

203203
jQuery.Topic = function( id ) {
204-
var callbacks,
205-
method,
204+
var callbacks, method,
206205
topic = id &amp;&amp; topics[ id ];
207206

208207
if ( !topic ) {

entries/jQuery.ajax.xml

+29-29
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<signature>
1515
<added>1.0</added>
1616
<argument name="settings" type="PlainObject" optional="true">
17-
<desc>A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with <a href="/jQuery.ajaxSetup">$.ajaxSetup()</a>.</desc>
17+
<desc>A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with <a href="/jQuery.ajaxSetup/">$.ajaxSetup()</a>.</desc>
1818
<property default="depends on DataType" name="accepts" type="PlainObject">
1919
<desc>The content type sent in the request header that tells the server what kind of response it will accept in return. If the <code>accepts</code> setting needs modification, it is recommended to do so once in the <code>$.ajaxSetup()</code> method.</desc>
2020
</property>
@@ -79,10 +79,10 @@ $.ajax({
7979
<argument name="jqXHR" type="jqXHR"/>
8080
<argument name="textStatus" type="String"/>
8181
<argument name="errorThrown" type="String"/>
82-
<desc>A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides <code>null</code>) are <code>"timeout"</code>, <code>"error"</code>, <code>"abort"</code>, and <code>"parsererror"</code>. When an HTTP error occurs, <code>errorThrown</code> receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." <strong>As of jQuery 1.5</strong>, the <code>error</code> setting can accept an array of functions. Each function will be called in turn. <strong>Note:</strong> <em>This handler is not called for cross-domain script and cross-domain JSONP requests.</em> This is an <a href="/Ajax_Events">Ajax Event</a>. </desc>
82+
<desc>A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides <code>null</code>) are <code>"timeout"</code>, <code>"error"</code>, <code>"abort"</code>, and <code>"parsererror"</code>. When an HTTP error occurs, <code>errorThrown</code> receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." <strong>As of jQuery 1.5</strong>, the <code>error</code> setting can accept an array of functions. Each function will be called in turn. <strong>Note:</strong> <em>This handler is not called for cross-domain script and cross-domain JSONP requests.</em> This is an <a href="/Ajax_Events/">Ajax Event</a>. </desc>
8383
</property>
8484
<property default="true" name="global" type="Boolean">
85-
<desc>Whether to trigger global Ajax event handlers for this request. The default is <code>true</code>. Set to <code>false</code> to prevent the global handlers like <code>ajaxStart</code> or <code>ajaxStop</code> from being triggered. This can be used to control various <a href="/Ajax_Events">Ajax Events</a>.</desc>
85+
<desc>Whether to trigger global Ajax event handlers for this request. The default is <code>true</code>. Set to <code>false</code> to prevent the global handlers like <code>ajaxStart</code> or <code>ajaxStop</code> from being triggered. This can be used to control various <a href="/Ajax_Events/">Ajax Events</a>.</desc>
8686
</property>
8787
<property name="headers" type="PlainObject" default="{}" added="1.5">
8888
<desc>An object of additional header key/value pairs to send along with requests using the XMLHttpRequest transport. The header <code>X-Requested-With: XMLHttpRequest</code> is always added, but its default <code>XMLHttpRequest</code> value can be changed here. Values in the <code>headers</code> setting can also be overwritten from within the <code>beforeSend</code> function.</desc>
@@ -154,18 +154,16 @@ $.ajax({
154154
</property>
155155
<property name="xhrFields" type="PlainObject" added="1.5.1">
156156
<desc>
157-
<p>An object of fieldName-fieldValue pairs to set on the native <code><abbr title="XMLHttpRequest">XHR</abbr></code> object. For example, you can use it to set <code>withCredentials</code> to <code>true</code> for cross-domain requests if needed.
158-
<pre><code>
157+
<p>An object of fieldName-fieldValue pairs to set on the native <code><abbr title="XMLHttpRequest">XHR</abbr></code> object. For example, you can use it to set <code>withCredentials</code> to <code>true</code> for cross-domain requests if needed.</p>
158+
<pre><code>
159159
$.ajax({
160160
url: a_cross_domain_url,
161161
xhrFields: {
162162
withCredentials: true
163163
}
164164
});
165-
</code></pre>
166-
<p><strong>In jQuery 1.5</strong>, the <code>withCredentials</code> property was not propagated to the native <code>XHR</code> and thus CORS requests requiring it would ignore this flag. For this reason, we recommend using jQuery 1.5.1+ should you require the use of it.
167-
</p>
168-
</p>
165+
</code></pre>
166+
<p><strong>In jQuery 1.5</strong>, the <code>withCredentials</code> property was not propagated to the native <code>XHR</code> and thus CORS requests requiring it would ignore this flag. For this reason, we recommend using jQuery 1.5.1+ should you require the use of it.</p>
169167
</desc>
170168
</property>
171169
</argument>
@@ -190,11 +188,11 @@ $.ajax({
190188
}
191189
})
192190
.done(function( data ) {
193-
if( console &amp;&amp; console.log ) {
191+
if ( console &amp;&amp; console.log ) {
194192
console.log( "Sample of data:", data.slice( 0, 100 ) );
195193
}
196194
});
197-
</code></pre>
195+
</code></pre>
198196
<p>The jqXHR objects returned by <code>$.ajax()</code> as of jQuery 1.5 implement the Promise interface, giving them all the properties, methods, and behavior of a Promise (see <a href="/category/deferred-object/">Deferred object</a> for more information). These methods take one or more function arguments that are called when the <code>$.ajax()</code> request terminates. This allows you to assign multiple callbacks on a single request, and even to assign callbacks after the request may have completed. (If the request is already complete, the callback is fired immediately.) Available Promise methods of the jqXHR object include: </p>
199197
<ul>
200198
<li>
@@ -222,22 +220,22 @@ $.ajax({
222220
</div>
223221
<pre><code>
224222
// Assign handlers immediately after making the request,
225-
// and remember the jqxhr object for this request
223+
// and remember the jqXHR object for this request
226224
var jqxhr = $.ajax( "example.php" )
227225
.done(function() {
228226
alert( "success" );
229-
})
227+
})
230228
.fail(function() {
231229
alert( "error" );
232-
})
230+
})
233231
.always(function() {
234232
alert( "complete" );
235-
});
233+
});
236234

237-
// perform other work here ...
235+
// Perform other work here ...
238236

239237
// Set another completion function for the request above
240-
jqxhr.always(function() {
238+
jqxhr.always(function() {
241239
alert( "second complete" );
242240
});
243241
</code></pre>
@@ -308,7 +306,8 @@ var jqxhr = $.ajax( "example.php" )
308306
<pre><code>
309307
(function() {
310308
var _super = jQuery.ajaxSettings.xhr,
311-
xhrCorsHeaders = [ "Cache-Control", "Content-Language", "Content-Type", "Expires", "Last-Modified", "Pragma" ];
309+
xhrCorsHeaders = [ "Cache-Control", "Content-Language", "Content-Type",
310+
"Expires", "Last-Modified", "Pragma" ];
312311

313312
jQuery.ajaxSettings.xhr = function() {
314313
var xhr = _super(),
@@ -321,8 +320,7 @@ var jqxhr = $.ajax( "example.php" )
321320
if ( allHeaders ) {
322321
return allHeaders;
323322
}
324-
} catch ( e ) {
325-
}
323+
} catch ( e ) {}
326324

327325
$.each( xhrCorsHeaders, function( i, headerName ) {
328326
if ( xhr.getResponseHeader( headerName ) ) {
@@ -349,7 +347,7 @@ $.ajaxSetup({
349347
},
350348
converters: {
351349
"mycustomtype json": function( result ) {
352-
// do stuff
350+
// Do stuff
353351
return newresult;
354352
}
355353
}
@@ -365,7 +363,7 @@ $.ajaxSetup({
365363
converters: {
366364
"text mycustomtype": true,
367365
"mycustomtype json": function( result ) {
368-
// do stuff
366+
// Do stuff
369367
return newresult;
370368
}
371369
}
@@ -382,9 +380,10 @@ $.ajax({
382380
type: "POST",
383381
url: "some.php",
384382
data: { name: "John", location: "Boston" }
385-
}).done(function( msg ) {
386-
alert( "Data Saved: " + msg );
387-
});
383+
})
384+
.done(function( msg ) {
385+
alert( "Data Saved: " + msg );
386+
});
388387
]]></code>
389388
</example>
390389
<example>
@@ -393,9 +392,10 @@ $.ajax({
393392
$.ajax({
394393
url: "test.html",
395394
cache: false
396-
}).done(function( html ) {
397-
$( "#results" ).append( html );
398-
});
395+
})
396+
.done(function( html ) {
397+
$( "#results" ).append( html );
398+
});
399399
]]></code>
400400
</example>
401401
<example>
@@ -409,7 +409,7 @@ var xmlRequest = $.ajax({
409409
data: xmlDocument
410410
});
411411
412-
xmlRequest.done(handleResponse);
412+
xmlRequest.done( handleResponse );
413413
]]></code>
414414
</example>
415415
<example>

entries/jQuery.ajaxPrefilter.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<longdesc>
1515
<p>A typical prefilter registration using <code>$.ajaxPrefilter()</code> looks like this:</p>
1616
<pre><code>
17-
$.ajaxPrefilter( function( options, originalOptions, jqXHR ) {
17+
$.ajaxPrefilter(function( options, originalOptions, jqXHR ) {
1818
// Modify options, control originalOptions, store jqXHR, etc
1919
});
2020
</code></pre>
@@ -39,7 +39,7 @@ $.ajaxPrefilter(function( options, originalOptions, jqXHR ) {
3939
</code></pre>
4040
<p>Prefilters can also be used to modify existing options. For example, the following proxies cross-domain requests through http://mydomain.net/proxy/:</p>
4141
<pre><code>
42-
$.ajaxPrefilter( function( options ) {
42+
$.ajaxPrefilter(function( options ) {
4343
if ( options.crossDomain ) {
4444
options.url = "http://mydomain.net/proxy/" + encodeURIComponent( options.url );
4545
options.crossDomain = false;

entries/jQuery.ajaxTransport.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<p>Since each request requires its own transport object instance, transports cannot be registered directly. Therefore, you should provide a function that returns a transport instead.</p>
1717
<p>Transports factories are registered using <code>$.ajaxTransport()</code>. A typical registration looks like this:</p>
1818
<pre><code>
19-
$.ajaxTransport( function( options, originalOptions, jqXHR ) {
19+
$.ajaxTransport(function( options, originalOptions, jqXHR ) {
2020
if( /* transportCanHandleRequest */ ) {
2121
return {
2222
send: function( headers, completeCallback ) {
@@ -51,7 +51,7 @@ function( status, statusText, responses, headers ) {}
5151
<p>Just like prefilters, a transport's factory function can be attached to a specific dataType:</p>
5252
<pre><code>
5353
$.ajaxTransport( "script", function( options, originalOptions, jqXHR ) {
54-
// Will only be called for script requests
54+
// Will only be called for script requests
5555
});
5656
</code></pre>
5757
<p>The following example shows how a minimal image transport could be implemented:</p>
@@ -64,8 +64,8 @@ $.ajaxTransport( "image", function( s ) {
6464
image = new Image();
6565
function done( status ) {
6666
if ( image ) {
67-
var statusText = ( status == 200 ) ? "success" : "error",
68-
tmp = image;
67+
var statusText = ( status === 200 ) ? "success" : "error",
68+
tmp = image;
6969
image = image.onreadystatechange = image.onerror = image.onload = null;
7070
callback( status, statusText, { image: tmp } );
7171
}
@@ -93,9 +93,9 @@ $.ajaxTransport( "image", function( s ) {
9393
<p> The unminified jQuery source itself includes a list of default converters, which effectively illustrates how they can be used: </p>
9494
<pre><code>
9595
// List of data converters
96-
// 1) key format is "source_type destination_type"
96+
// 1) Key format is "source_type destination_type"
9797
// (a single space in-between)
98-
// 2) the catchall symbol "*" can be used for source_type
98+
// 2) The catchall symbol "*" can be used for source_type
9999
converters: {
100100
// Convert anything to text
101101
"* text": window.String,

entries/jQuery.boxModel.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<signature>
55
<added>1.0</added>
66
</signature>
7-
<desc><strong>Deprecated in jQuery 1.3 (see <a href="/jQuery.support">jQuery.support</a>)</strong>. States if the current page, in the user's browser, is being rendered using the <a href="http://www.w3.org/TR/REC-CSS2/box.html">W3C CSS Box Model</a>.</desc>
7+
<desc><strong>Deprecated in jQuery 1.3 (see <a href="/jQuery.support/">jQuery.support</a>)</strong>. States if the current page, in the user's browser, is being rendered using the <a href="http://www.w3.org/TR/REC-CSS2/box.html">W3C CSS Box Model</a>.</desc>
88
<longdesc/>
99
<example>
1010
<desc>Returns the box model for the iframe.</desc>

entries/jQuery.browser.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<example>
2424
<desc>Show the browser info.</desc>
2525
<code><![CDATA[
26-
jQuery.each(jQuery.browser, function( i, val ) {
26+
jQuery.each( jQuery.browser, function( i, val ) {
2727
$( "<div>" + i + " : <span>" + val + "</span>" )
2828
.appendTo( document.body );
2929
});
@@ -39,7 +39,7 @@ $.browser.msie;
3939
<desc>Alert "this is WebKit!" only for WebKit browsers. <strong>Will not work in jQuery 1.9 or later</strong> unless the <a href="https://github.com/jquery/jquery-migrate/#readme">jQuery Migrate</a> plugin is included.</desc>
4040
<code><![CDATA[
4141
if ( $.browser.webkit ) {
42-
alert( "this is webkit!" );
42+
alert( "This is WebKit!" );
4343
}
4444
]]></code>
4545
</example>

0 commit comments

Comments
 (0)