jQuery :visible Selector

Example

Select each visible element within the <body> element:

$('body :visible')

Try It Yourself

Definition and Usage

The ':visible' selector selects each element that is currently visible.

All elements except the following are visible elements:

  • Set to display:none
  • Form elements with type="hidden"
  • Width and height set to 0
  • Hidden parent elements (hiding all child elements at the same time)

Syntax

$(':visible')