O'Reilly logo

jQuery and JavaScript Phrasebook by Brad Dayley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Selecting Elements Based on Visibility

$("div:visible");   //selects <div> elements that are currently visible $("div:hidden");   //selects <div> elements that are currently hidden

If you are using visibility to control the flow and interactions of your web page components then using the visibility jQuery selectors makes it simple to select the HTML elements that are hidden or visible. Table 4.6 shows some examples of visibility selectors.

Image

Table 4.6 Examples of Using Attribute jQuery Selectors

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required