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
* master:
Add entry for $.parseHTML
Add deprecation notices for error load, unload events
Add entry for jQuery.parseHTML()
:checked selector: Clean up examples
.addClass(): Trivial cleanup.
jQuery.contains(): Clarify language.
Mark .toggle() event as deprecated in 1.8
Removing <em> tags from example code on live() entry - Closesgh-165
Copy file name to clipboardExpand all lines: entries/jQuery.contains.xml
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -7,20 +7,21 @@
7
7
<desc>The DOM element that may contain the other element.</desc>
8
8
</argument>
9
9
<argumentname="contained"type="Element">
10
-
<desc>The DOM element that may be contained by the other element.</desc>
10
+
<desc>The DOM element that may be contained by (a descendant of) the other element.</desc>
11
11
</argument>
12
12
</signature>
13
-
<desc>Check to see if a DOM element is within another DOM element.</desc>
13
+
<desc>Check to see if a DOM element is a descendant of another DOM element.</desc>
14
14
<longdesc>
15
+
<p>The <code>$.contains()</code> method returns <code>true</code> if the DOM element provided by the second argument is a descendant of the DOM element provided by the first argument, whether it is a direct child or nested more deeply. Otherwise, it returns <code>false</code>. Only <em>element</em> nodes are supported; if the second argument is a text or comment node, <code>$.contains()</code> will return <code>false</code>.</p>
15
16
<blockquote>
16
17
<p><strong>Note:</strong> The first argument <em>must</em> be a DOM element, not a jQuery object or plain JavaScript object.</p>
17
18
</blockquote>
18
19
</longdesc>
19
20
<example>
20
-
<desc>Check if an element is inside another. Text and comment nodes are not supported.</desc>
<desc>A Boolean indicating whether to include scripts passed in the HTML string</desc>
15
+
</argument>
16
+
</signature>
17
+
<longdesc>
18
+
<p><code>jQuery.parseHTML</code> uses a native DOM element creation function to convert the string to a set of DOM elements, which can then be inserted into the document.</p>
19
+
</longdesc>
20
+
<example>
21
+
<desc>Create an array of Dom nodes using an HTML string and insert it into a div.</desc>
Copy file name to clipboardExpand all lines: entries/live.xml
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -34,9 +34,9 @@
34
34
<p>This method provides a means to attach delegated event handlers to the <code>document</code> element of a page, which simplifies the use of event handlers when content is dynamically added to a page. See the discussion of direct versus delegated events in the <ahref="http://api.jquery.com/on/"><code>.on()</code></a> method for more information. </p>
35
35
<p>Rewriting the <code>.live()</code> method in terms of its successors is straightforward; these are templates for equivalent calls for all three event attachment methods:</p>
<p>The <code>events</code> argument can either be a space-separated list of event type names and optional namespaces, or an object of event name strings and handlers. The <code>data</code> argument is optional and can be omitted. For example, the following three method calls are functionally equivalent (but see below for more effective and performant ways to attach delegated event handlers):</p>
0 commit comments