I need to check the visibility
attribute of a div
.
if ($('#divFiltros').css('visibility', 'visible').val() == true) {
alert(true);
}
else {
alert(false);
}
How do I check and enter this if
of the example?
I need to check the visibility
attribute of a div
.
if ($('#divFiltros').css('visibility', 'visible').val() == true) {
alert(true);
}
else {
alert(false);
}
How do I check and enter this if
of the example?
You can use either:
if(!$('.target').is(':hidden'))
as
if (!$('.target').css('visibility') == 'hidden'))
or even
if($('.target').is(':visible'))
Use the jQuery () .is function:
if ($('#divFiltros').is(":visible")) {
alert(true);
}
else {
alert(false);
}