jQuery Tutorial Tutorials - jQuery :visible selector

:visible selector

The jQuery :visible selector is used to select all the elements that are visible.

Elements are considered visible if they consume space in the document.

style visible/hidden
display:none hidden
display:block visible
width:0;height:0 hidden(jQuery ver1.9) , visible(jQuery ver3.4)
width>0;height:0 visible
width:0;height>0 visible
visibility:hidden visible
opacity:0 visible
type="hidden" hidden

jQuery :visible selector Syntax

$(':visible')

jQuery :visible selector Examples

Following is a simple example which makes use of :visible Selector.
This would make all visible divs have a crimson-colored border.

Try now

Date:2019-08-19 15:28:20 From:www.Lautturi.com author:Lautturi