habib
0
Q:

check if element is visible jquery

// Checks CSS content for display:[none|block], ignores visibility:[true|false]
$(element).is(":visible");

// The same works with hidden
$(element).is(":hidden");
10
.is(':visible')
//Selects all elements that are visible.

if($('#Div').is(':visible')){
	// add whatever code you want to run here.
}

$('#yourDiv:visible').callYourFunction();
8
.is(':visible')
//Selects all elements that are visible.

if($('#yourDiv').is(':visible')){
	//do stuff in here
}
//or
$('#yourDiv:visible').callYourFunction();
2
// Checks css for display:[none|block], ignores visibility:[true|false]
$(element).is(":hidden"); 
0
$('.eipC:visible').length 

//or

$('.eipC').is(':visible').length
0

New to Communities?

Join the community