In order to select all visible or hidden elements in a page using jQuery, we can use the following jQuery selectors:
:visible Selector The visible Selector is used to select all the elements that are currently visible in the document.
:hidden Selector The hidden selector selects hidden elements to work upon.
Below example illustrates the above approach:
- How to select elements by attribute in jQuery ?
- How to Select a Range of Elements using jQuery ?
- How to select all elements without a given class using jQuery ?
- How to select all elements that contains some specific CSS property using jQuery ?
- How to select html element using ID in jQuery when ID contains a dot character ?
- How to get title of current HTML page using jQuery ?
- Difference between 'hidden' and 'aria-hidden' attributes in HTML
- jQuery | :visible Selector
- How to check an element is visible or not using jQuery?
- jQuery | :hidden Selector
- How to check if an element is hidden in jQuery?
- Get the height of the hidden element in jQuery
- How to create hidden form element on the fly using jQuery ?
- How to detect value change on hidden input field in JQuery ?
- How to Display/Hide functions using aria-hidden attribute in jQuery ?
- How to use jQuery to Search and Replace HTML elements?
- How to redirect a page to another page in HTML ?
- How to select a div with a certain class using jQuery ?
- jQuery | select() with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.