Skip to content

Commit d0e7282

Browse files
committed
Visibility filters: Specified new behavior
Fixes gh-737 Closes gh-789
1 parent 270b518 commit d0e7282

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

entries/hidden-selector.xml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<p>Elements that are not in a document are not considered to be visible; jQuery does not have a way to know if they will be visible when appended to a document since it depends on the applicable styles.</p>
1919
<p>During animations to show an element, the element is considered to be visible at the start of the animation.</p>
2020
<p>How <code>:hidden</code> is determined was changed in jQuery 1.3.2. An element is assumed to be hidden if it or any of its parents consumes no space in the document. CSS visibility isn't taken into account (therefore <code>$( elem ).css( "visibility", "hidden" ).is( ":hidden" ) == false</code>). The <a href="http://blog.jquery.com/2009/02/20/jquery-1-3-2-released/">release notes</a> outline the changes in more detail.</p>
21+
<p>jQuery 3 slightly modifies the meaning of <code>:hidden</code> (and therefore of <a href="/visible-selector/"><code>:visible</code></a>). Starting with this version, elements will be considered <code>:hidden</code> if they don't have any layout boxes. For example, <code>br</code> elements and inline elements with no content will not be selected by the <code>:hidden</code> selector.</p>
2122
</longdesc>
2223
<note id="jquery-selector-extension" type="additional" data-selector=":hidden"/>
2324
<note id="hidden-forces-layout" type="additional"/>

entries/visible-selector.xml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<p>All <code>option</code> elements are considered hidden, regardless of their <code>selected</code> state.</p>
1414
<p>During animations that hide an element, the element is considered visible until the end of the animation. During animations to show an element, the element is considered visible at the start at the animation.</p>
1515
<p>How <code>:visible</code> is calculated was changed in jQuery 1.3.2. The <a href="http://blog.jquery.com/2009/02/20/jquery-1-3-2-released/">release notes</a> outline the changes in more detail.</p>
16+
<p>jQuery 3 slightly modifies the meaning of <code>:visible</code> (and therefore of <a href="/hidden-selector/"><code>:hidden</code></a>). Starting with this version, elements will be considered <code>:visible</code> if they have any layout boxes, including those of zero width and/or height. For example, <code>br</code> elements and inline elements with no content will be selected by the <code>:visible</code> selector.</p>
1617
</longdesc>
1718
<note id="jquery-selector-extension" type="additional" data-selector=":visible"/>
1819
<note id="hidden-forces-layout" type="additional"/>

0 commit comments

Comments
 (0)