jQuery :visibleSelector

jQuery 选择器jQuery Selectors

Examples

Select all visible <p> elements:

$("p:visible")

Try it yourself »

Definition and Usage

The :visible selector selects every element that is currently visible.

Elements are considered visible except in the following cases:

  • Set to display:none
  • Form elements with type="hidden"
  • width and height set to 0
  • Hidden parent element (this also hides child elements)

Syntax

$(":visible")


jQuery 选择器jQuery Selectors

Other Extensions