$("element").filter(function() { return $(this).css("display") == "none" });
There are two methods in jQuery to check for visibility:
$("#selector").is(":visible")
and
$("#selector").is(":hidden")
You can also execute commands based on visibility in the selector;
$("#selector:visible").hide()
or
$("#selector:hidden").show()
another shortcut i personally prefer more than .is() or .length:
if($('.myclass:visible')[0]){
// is visible
}else {
// is hidden
}
Yes, you can use the cssfunction. The below will search all divs, but you can modify it for whatever elements you need
$('div').each(function(){
if ( $(this).css('display') == 'none')
{
//do something
}
});
$('#selector').is(':visible');
Use this condition:
if (jQuery(".profile-page-cont").css('display') == 'block'){
// Condition
}
Source: Stackoverflow.com