This example describes the jquery visibility filter: Hidden and: visibility usage. Share to everyone for your reference. The specific analysis is as follows:
: Hidden
Matches all invisible elements, if you use the CSS visibility property so that the element does not display but occupies a bit, it does not belong to the hidden
Find Display:none TR element, $ ("Tr:hidden")
: Visible
Match all visible elements
Find all elements that display is not none, $ ("tr:visible")
Example:
?
1 2 3 4 5 |
<tr id= "One" style= "Display:none;" ><td>1</td><td>2</td></tr> <tr id= "Two" style= "Visibility:hidden;" ><td>3</td><td>4</td></tr> <tr id= "three" ><td>5</td><td >6</td></tr> $ ("Tr:hidden")//Select element $ ("tr:visible") with ID one;//select elements with ID "two" and "three" |
In fact, here two filters do not care whether the element is hidden invisible, I think as long as the Display:none is used: Hidden can be obtained, if there is no display:none, no matter what can be obtained.
I hope this article will help you with your jquery programming.