You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: entries/contents.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ $( ".container" )
33
33
.filter( "br" )
34
34
.remove();
35
35
</code></pre>
36
-
<p>This code first retrieves the contents of <code><div class="container"></code> and then filters it for text nodes, which are wrapped in paragraph tags. This is accomplished by testing the <ahref="https://developer.mozilla.org/en/nodeType"><code>.nodeType</code> property</a> of the element. This DOM property holds a numeric code indicating the node's type; text nodes use the code 3. The contents are again filtered, this time for <code><br /></code> elements, and these elements are removed.</p>
36
+
<p>This code first retrieves the contents of <code><div class="container"></code> and then filters it for text nodes, which are wrapped in paragraph tags. This is accomplished by testing the <ahref="https://developer.mozilla.org/docs/en/DOM/Node.nodeType"><code>.nodeType</code> property</a> of the element. This DOM property holds a numeric code indicating the node's type; text nodes use the code 3. The contents are again filtered, this time for <code><br /></code> elements, and these elements are removed.</p>
37
37
</longdesc>
38
38
<example>
39
39
<desc>Find all the text nodes inside a paragraph and wrap them with a bold tag.</desc>
<p>When this statement is executed, the element slides up for 300 milliseconds and then pauses for 800 milliseconds before fading in for 400 milliseconds.</p>
22
22
<divclass="warning">
23
23
<p>
24
-
<strong>The <code>.delay()</code> method is best for delaying between queued jQuery effects. Because it is limited—it doesn't, for example, offer a way to cancel the delay—<code>.delay()</code> is not a replacement for JavaScript's native <ahref="https://developer.mozilla.org/en/DOM/window.setTimeout">setTimeout</a> function, which may be more appropriate for certain use cases.</strong>
24
+
<strong>The <code>.delay()</code> method is best for delaying between queued jQuery effects. Because it is limited—it doesn't, for example, offer a way to cancel the delay—<code>.delay()</code> is not a replacement for JavaScript's native <ahref="https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers.setTimeout">setTimeout</a> function, which may be more appropriate for certain use cases.</strong>
<p>Given a document with six paragraphs, this example will set the HTML of <code><div class="demo-container"></code> to <code><p>All new content for <em>6 paragraphs!</em></p></code>.</p>
121
121
<p>This method uses the browser's <code>innerHTML</code> property. Some browsers may not generate a DOM that exactly replicates the HTML source provided. For example, Internet Explorer prior to version 8 will convert all <code>href</code> properties on links to absolute URLs, and Internet Explorer prior to version 9 will not correctly handle HTML5 elements without the addition of a separate <ahref="http://code.google.com/p/html5shiv/">compatibility layer</a>.</p>
122
-
<p>To set the content of a <code><script></code> element, which does not contain HTML, use the <ahref="/text"><code>.text()</code></a> method and not <code>.html()</code>.</p>
122
+
<p>To set the content of a <code><script></code> element, which does not contain HTML, use the <ahref="/text/"><code>.text()</code></a> method and not <code>.html()</code>.</p>
123
123
<p><strong>Note:</strong> In Internet Explorer up to and including version 9, setting the text content of an HTML element may corrupt the text nodes of its children that are being removed from the document as a result of the operation. If you are keeping references to these DOM elements and need them to be unchanged, use <code>.empty().html( string )</code> instead of <code>.html(string)</code> so that the elements are removed from the document before the new string is assigned to the element.</p>
Copy file name to clipboardExpand all lines: entries/id-selector.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@
13
13
<p>For id selectors, jQuery uses the JavaScript function <code>document.getElementById()</code>, which is extremely efficient. When another selector is attached to the id selector, such as <code>h2#pageTitle</code>, jQuery performs an additional check before identifying the element as a match.</p>
14
14
<p>Calling <code>jQuery()</code> (or <code>$()</code>) with an id selector as its argument will return a jQuery object containing a collection of either zero or one DOM element.</p>
15
15
<p>Each <code>id</code> value must be used only once within a document. If more than one element has been assigned the same ID, queries that use that ID will only select the first matched element in the DOM. This behavior should not be relied on, however; a document with more than one element using the same ID is invalid.</p>
16
-
<p>If the id contains characters like periods or colons you have to <ahref="http://learn.jquery.com/faq/how-do-i-select-an-element-by-an-id-that-has-characters-used-in-css-notation/">escape those characters with backslashes</a>.</p>
16
+
<p>If the id contains characters like periods or colons you have to <ahref="http://learn.jquery.com/using-jquery-core/faq/how-do-i-select-an-element-by-an-id-that-has-characters-used-in-css-notation/">escape those characters with backslashes</a>.</p>
17
17
</longdesc>
18
18
<example>
19
19
<desc>Select the element with the id "myDiv" and give it a red border.</desc>
Copy file name to clipboardExpand all lines: entries/jQuery.ajax.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ $.ajax({
74
74
</property>
75
75
<propertyname="dataType"default="Intelligent Guess (xml, json, script, or html)"type="String">
76
76
<desc>The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string). The available types (and the result passed as the first argument to your success callback) are:
77
-
<ul><li>"xml": Returns a XML document that can be processed via jQuery.</li><li>"html": Returns HTML as plain text; included script tags are evaluated when inserted in the DOM.</li><li>"script": Evaluates the response as JavaScript and returns it as plain text. Disables caching by appending a query string parameter, "_=[TIMESTAMP]", to the URL unless the <code>cache</code> option is set to <code>true</code>. <strong>Note:</strong> This will turn POSTs into GETs for remote-domain requests. </li><li>"json": Evaluates the response as JSON and returns a JavaScript object. The JSON data is parsed in a strict manner; any malformed JSON is rejected and a parse error is thrown. As of jQuery 1.9, an empty response is also rejected; the server should return a response of <code>null</code> or <code>{}</code> instead. (See <a href="http://json.org/">json.org</a> for more information on proper JSON formatting.)</li><li>"jsonp": Loads in a JSON block using <a href="http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/">JSONP</a>. Adds an extra "?callback=?" to the end of your URL to specify the callback. Disables caching by appending a query string parameter, "_=[TIMESTAMP]", to the URL unless the <code>cache</code> option is set to <code>true</code>.</li><li>"text": A plain text string.</li><li>multiple, space-separated values: <strong>As of jQuery 1.5</strong>, jQuery can convert a dataType from what it received in the Content-Type header to what you require. For example, if you want a text response to be treated as XML, use "text xml" for the dataType. You can also make a JSONP request, have it received as text, and interpreted by jQuery as XML: "jsonp text xml." Similarly, a shorthand string such as "jsonp xml" will first attempt to convert from jsonp to xml, and, failing that, convert from jsonp to text, and then from text to xml.
77
+
<ul><li>"xml": Returns a XML document that can be processed via jQuery.</li><li>"html": Returns HTML as plain text; included script tags are evaluated when inserted in the DOM.</li><li>"script": Evaluates the response as JavaScript and returns it as plain text. Disables caching by appending a query string parameter, "_=[TIMESTAMP]", to the URL unless the <code>cache</code> option is set to <code>true</code>. <strong>Note:</strong> This will turn POSTs into GETs for remote-domain requests. </li><li>"json": Evaluates the response as JSON and returns a JavaScript object. The JSON data is parsed in a strict manner; any malformed JSON is rejected and a parse error is thrown. As of jQuery 1.9, an empty response is also rejected; the server should return a response of <code>null</code> or <code>{}</code> instead. (See <a href="http://json.org/">json.org</a> for more information on proper JSON formatting.)</li><li>"jsonp": Loads in a JSON block using <a href="http://bob.ippoli.to/archives/2005/12/05/remote-json-jsonp/">JSONP</a>. Adds an extra "?callback=?" to the end of your URL to specify the callback. Disables caching by appending a query string parameter, "_=[TIMESTAMP]", to the URL unless the <code>cache</code> option is set to <code>true</code>.</li><li>"text": A plain text string.</li><li>multiple, space-separated values: <strong>As of jQuery 1.5</strong>, jQuery can convert a dataType from what it received in the Content-Type header to what you require. For example, if you want a text response to be treated as XML, use "text xml" for the dataType. You can also make a JSONP request, have it received as text, and interpreted by jQuery as XML: "jsonp text xml." Similarly, a shorthand string such as "jsonp xml" will first attempt to convert from jsonp to xml, and, failing that, convert from jsonp to text, and then from text to xml.
Copy file name to clipboardExpand all lines: entries/odd-selector.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
<signature>
6
6
<added>1.0</added>
7
7
</signature>
8
-
<desc>Selects odd elements, zero-indexed. See also <ahref="/Selectors/even/">even</a>.</desc>
8
+
<desc>Selects odd elements, zero-indexed. See also <ahref="/even-selector/">even</a>.</desc>
9
9
<longdesc>
10
10
<p>In particular, note that the <em>0-based indexing</em> means that, counter-intuitively, <code>:odd</code> selects the second element, fourth element, and so on within the matched set.</p>
Copy file name to clipboardExpand all lines: entries/triggerHandler.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@
14
14
</argument>
15
15
</signature>
16
16
<longdesc>
17
-
<p><code>.triggerHandler( eventType )</code> executes all handlers bound with jQuery for the event type. It will also execute any method called <code>on{eventType}()</code> found on the element. The behavior of this method is similar to <ahref="/trigger"><code>.trigger()</code></a>, with the following exceptions:</p>
17
+
<p><code>.triggerHandler( eventType )</code> executes all handlers bound with jQuery for the event type. It will also execute any method called <code>on{eventType}()</code> found on the element. The behavior of this method is similar to <ahref="/trigger/"><code>.trigger()</code></a>, with the following exceptions:</p>
18
18
<ul>
19
19
<li>The <code>.triggerHandler( "event" )</code> method will not call <code>.event()</code> on the element it is triggered on. This means <code>.triggerHandler( "submit" )</code> on a form will not call <code>.submit()</code> on the form.</li>
20
20
<li>While <code>.trigger()</code> will operate on all elements matched by the jQuery object, <code>.triggerHandler()</code> only affects the first matched element.</li>
Copy file name to clipboardExpand all lines: entries/val.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@
12
12
<desc>Get the current value of the first element in the set of matched elements.</desc>
13
13
<longdesc>
14
14
<p>The <code>.val()</code> method is primarily used to get the values of form elements such as <code>input</code>, <code>select</code> and <code>textarea</code>. In the case of <code>select</code> elements, it returns <code>null</code> when no option is selected and an array containing the value of each selected option when there is at least one and it is possible to select more because the <code>multiple</code> attribute is present.</p>
15
-
<p>For selects and checkboxes, you can also use the <ahref="/selected/">:selected</a> and <ahref="/checked/">:checked</a> selectors to get at values, for example:</p>
15
+
<p>For selects and checkboxes, you can also use the <ahref="/selected-selector/">:selected</a> and <ahref="/checked-selector/">:checked</a> selectors to get at values, for example:</p>
Copy file name to clipboardExpand all lines: pages/Types.html
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
</style>
12
12
<p>JavaScript provides several built-in datatypes. In addition to those, this page documents virtual types like Selectors, enhanced pseudo-types like Events and all and everything you wanted to know about Functions.
13
13
</p>
14
-
<p>You should be able to try out most of the examples below by just copying them to your browser's JavaScript Console (Chrome, Safari with Develop menu activated, IE 8+) or <ahref="http://www.getfirebug.com/">Firebug</a> console (<ahref="http://www.getfirefox.com">Firefox</a>).
14
+
<p>You should be able to try out most of the examples below by just copying them to your browser's JavaScript Console (Chrome, Safari with Develop menu activated, IE 8+) or <ahref="http://www.getfirebug.com/">Firebug</a> console (<ahref="https://www.mozilla.org/en-US/firefox/new/?utm_source=getfirefox-com&utm_medium=referral">Firefox</a>).
15
15
</p>
16
16
<p>Whenever an example mentions that a type defaults to a boolean value, the result is good to know when using that type in a boolean context:
alert( "key is " + [ key ] + ", value is " + obj[ key ] );
297
297
}
298
298
</code></pre>
299
-
<p>Note that for-in-loop can be spoiled by extending Object.prototype (see <ahref="http://erik.eae.net/archives/2005/06/06/22.13.54" class="external text" title="http://erik.eae.net/archives/2005/06/06/22.13.54">Object.prototype is verboten</a>) so take care when using other libraries.
299
+
<p>Note that for-in-loop can be spoiled by extending Object.prototype (see <ahref="http://erik.eae.net/archives/2005/06/06/22.13.54/" class="external text" title="http://erik.eae.net/archives/2005/06/06/22.13.54/">Object.prototype is verboten</a>) so take care when using other libraries.
300
300
</p>
301
301
<p>jQuery provides a generic <ahref="/jQuery.each/"><em>each</em> function</a> to iterate over properties of objects, as well as elements of arrays:
<p>This indicates that the method doesn't only expect an array as the argument, but also specifies the expected type. The notation is borrowed from Java 5's generics notation (or C++ templates).
413
413
</p>
414
414
<h2id="PlainObject"> PlainObject </h2>
415
-
<p>The PlainObject type is a JavaScript object containing zero or more key-value pairs. The plain object is, in other words, an <code>Object</code> object. It is designated "plain" in jQuery documentation to distinguish it from other kinds of JavaScript objects: for example, <code>null</code>, user-defined arrays, and host objects such as <code>document</code>, all of which have a <code>typeof</code> value of "object." The <code><ahref="/jQuery.isPlainObject">jQuery.isPlainObject()</a></code> method identifies whether the passed argument is a plain object or not, as demonstrated below:
415
+
<p>The PlainObject type is a JavaScript object containing zero or more key-value pairs. The plain object is, in other words, an <code>Object</code> object. It is designated "plain" in jQuery documentation to distinguish it from other kinds of JavaScript objects: for example, <code>null</code>, user-defined arrays, and host objects such as <code>document</code>, all of which have a <code>typeof</code> value of "object." The <code><ahref="/jQuery.isPlainObject/">jQuery.isPlainObject()</a></code> method identifies whether the passed argument is a plain object or not, as demonstrated below:
<p>A document object created by the browser's XML DOM parser, usually from a string representing XML. XML documents have different semantics than HTML documents, but most of the traversing and manipulation methods provided by jQuery will work with them.</p>
643
643
<h2id="Assert">Assert</h2>
644
-
<p>A reference to or instance of the object holding all of QUnit's assertions. See the <ahref="//api.qunitjs.com/QUnit.assert">API documentation for <code>QUnit.assert</code></a> for details.</p>
644
+
<p>A reference to or instance of the object holding all of QUnit's assertions. See the <ahref="//api.qunitjs.com/QUnit.assert/">API documentation for <code>QUnit.assert</code></a> for details.</p>
0 commit comments