Skip to content

Commit 025e1fc

Browse files
AurelioDeRosatimmywil
authored andcommitted
Visibility filters: Specified new behavior
Fixes jquerygh-737 Closes jquerygh-789
1 parent 870eb80 commit 025e1fc

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
@@ -19,6 +19,7 @@
1919
<p>This selector is the opposite of the <a href="/visible-selector/"><code>:visible</code></a> selector. So, every element selected by <code>:hidden</code> isn't selected by <code>:visible</code> and vice versa.</p>
2020
<p>During animations to show an element, the element is considered to be visible at the start of the animation.</p>
2121
<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>
22+
<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>
2223
</longdesc>
2324
<note id="jquery-selector-extension" type="additional" data-selector=":hidden"/>
2425
<note id="hidden-forces-layout" type="additional"/>

entries/visible-selector.xml

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<p>All <code>option</code> elements are considered hidden, regardless of their <code>selected</code> state.</p>
1515
<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>
1616
<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>
17+
<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>
1718
</longdesc>
1819
<note id="jquery-selector-extension" type="additional" data-selector=":visible"/>
1920
<note id="hidden-forces-layout" type="additional"/>

0 commit comments

Comments
 (0)