jquery check if something is visible code example
Example 1: jquery see if element is visible
.is(':visible')
//Selects all elements that are visible.
if($('#yourDiv').is(':visible')){
//do stuff in here
}
//or
$('#yourDiv:visible').callYourFunction();
Example 2: How do I check if an element is hidden in jQuery?
// Checks CSS content for display:[none|block], ignores visibility:[true|false]
$(element).is(":visible");
// The same works with hidden
$(element).is(":hidden");