How to select elements with no visible children using jQuery ?
In this article we are going to learn how to select elements whose property is not visible or hidden. It simply means that the display property of that particular element is hidden, and we need to show whatever present in that element using the Jquery.
We can easily do this by using the Jquery:hidden selector. First, let’s see how you will know that the element is hidden, these elements are set to display: none; form element with type=”hidden”, Width and height set to 0 or A hidden parent element and this parent will also hide their children.
- jQuery :hidden Selector: The task of this selector is to select the element which has hidden property.
$(selector).show(speed,easing,callback) // All parameters are optional.
Example 1 :
Example 2: We have heading tag with display:none property and rest of the tags are visible. When you run the code first it will show you the visible content and then the hidden tags with the help of :hidden selector and .show() method.