{"name":"hidden","type":"selector","title":":hidden Selector","deprecated":null,"removed":null,"desc":"Selects all elements that are hidden.","categories":["selectors/jquery-selector-extensions","version/1.0","selectors/visibility-filter-selectors"],"entries":[{"return":"","signatures":{"added":"1.0"},"examples":{"desc":"Shows all hidden divs and counts hidden inputs.","code":"\n// In some browsers :hidden includes head, title, script, etc...\nvar hiddenElements = $( \"body\" ).find( \":hidden\" ).not( \"script\" );\n\n$( \"span:first\" ).text( \"Found \" + hiddenElements.length + \" hidden elements total.\" );\n$( \"div:hidden\" ).show( 3000 );\n$( \"span:last\" ).text( \"Found \" + $( \"input:hidden\" ).length + \" hidden inputs.\" );\n","css":"\n div {\n width: 70px;\n height: 40px;\n background: #e7f;\n margin: 5px;\n float: left;\n }\n span {\n display: block;\n clear: left;\n color: red;\n }\n .starthidden {\n display: none;\n }\n","html":"\n\n
\n
Hider!
\n
\n\n
Hider!
\n
\n\n
\n \n \n \n
\n\n\n"},"longdesc":"\n

Elements can be considered hidden for several reasons:

\n \n

Elements with visibility: hidden or opacity: 0 are considered to be visible, since they still consume space in the layout. During animations that hide an element, the element is considered to be visible until the end of the animation.

\n

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.

\n

During animations to show an element, the element is considered to be visible at the start of the animation.

\n

How :hidden 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 $( elem ).css( \"visibility\", \"hidden\" ).is( \":hidden\" ) == false). The release notes outline the changes in more detail.

\n "}],"slug":"hidden-selector"}