jQuery :hidden Selector Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The jQuery :hidden selector selects hidden elements to work upon. Syntax: $(":hidden")Set to display:noneForm elements with type="hidden"Width and height set to 0A hidden parent element (this also hides child elements)Example 1: HTML <!DOCTYPE html> <html> <head> <!-- Jquery CDN --> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> <!-- Jquery demonstration script --> <script> $(document).ready(function () { $("h1:hidden").show(3000); }); </script> <!-- Script ends here --> </head> <body> <center> <h1 style="display:none;"> GeeksforGeeks </h1> <p>Hidden attribute example</p> <p>The above line will show up gradually.</p> </center> </body> </html> Output: Example 2: HTML <!DOCTYPE html> <html lang="en"> <head> <title> Complex Animation Using Hidden Attribute </title> <style> h1 { color: green; } div { width: 70px; height: 40px; background: green; margin: 5px; float: left; } span { display: block; clear: left; color: black; } .starthidden { display: none; } </style> <script src= "https://code.jquery.com/jquery-1.10.2.js"> </script> </head> <body> <center> <h1>GeeksforGeeks</h1> </center> <span></span> <div></div> <div style="display:none;"> Hidden element </div> <div class="starthidden"> Hidden element2 </div> <div></div> <div style="display:none;"> Hidden element </div> <div class="starthidden"> Hidden element2 </div> <div></div> <form> <input type="hidden"> <input type="hidden"> <input type="hidden"> </form> <span></span> <script> let hiddenElements = $("body").find(":hidden").not("script"); $("span:first").text("We have found " + hiddenElements.length + " hidden elements total."); $("div:hidden").show(1000); $("span:last").text("We have found " + $("input:hidden").length + " hidden inputs."); </script> </body> </html> Output: Note: This selector will not work on elements with visibility: hidden. References: https://api.jquery.com/hidden-selector/ Comment I iamshrikantjha Follow Improve I iamshrikantjha Follow Improve Article Tags : JQuery Explore jQuery Tutorial 8 min read Getting Started with jQuery 4 min read jQuery Introduction 7 min read jQuery Syntax 2 min read jQuery CDN 4 min read jQuery SelectorsJQuery Selectors 5 min read jQuery * Selector 1 min read jQuery #id Selector 1 min read jQuery .class Selector 1 min read jQuery EventsjQuery Events 4 min read jQuery bind() Method 2 min read jQuery blur() Method 1 min read jQuery change() Method 2 min read jQuery EffectsjQuery animate() Method 2 min read jQuery clearQueue() Method 2 min read jQuery delay() Method 2 min read jQuery HTML/CSSjQuery addClass() Method 2 min read jQuery after() Method 1 min read jQuery append() Method 2 min read jQuery TraversingjQuery | Traversing 4 min read jQuery add() method 1 min read jQuery addBack() Method 2 min read Like