Skip to content

Commit

Permalink
Parent-selector: clarify description
Browse files Browse the repository at this point in the history
  • Loading branch information
kswedberg committed Aug 29, 2012
1 parent f4858cd commit 7688f95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entries/parent-selector.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<signature>
<added>1.0</added>
</signature>
<desc>Select all elements that are the parent of another element, including text nodes.</desc>
<desc>Select all elements that that have at least one child node (either an element or text).</desc>
<longdesc>
<p>This is the inverse of <code>:empty</code>. </p>
<p>One important thing to note regarding the use of <code>:parent</code> (and <code>:empty</code>) is that child elements include text nodes.</p>
<p>One important thing to note regarding the use of <code>:parent</code> (and <code>:empty</code>) is that child nodes include text nodes.</p>
<p>The W3C recommends that the <code>&lt;p&gt;</code> element have at least one child node, even if that child is merely text (see <a href="http://www.w3.org/TR/html401/struct/text.html#edef-P">http://www.w3.org/TR/html401/struct/text.html#edef-P</a>). Some other elements, on the other hand, are empty (i.e. have no children) by definition:<code> &lt;input&gt;</code>, <code>&lt;img&gt;</code>, <code>&lt;br&gt;</code>, and <code>&lt;hr&gt;</code>, for example.</p>
</longdesc>
<note id="jquery-selector-extension" type="additional" data-selector=":parent"/>
Expand Down

0 comments on commit 7688f95

Please sign in to comment.