+ 2
How do i check if an element is hidden or show in jquery?
if i use .hide() .show() and other functions. how would i test if an element is show or hidden?
4 Answers
0
i found. $(element).is(":visible");
0
or $("element:hidden")
$("element:show")
0
Hi, I'm sending links hoping that it helps you answer your question. I recommend this site that usually answers all questions ( https://stackoverflow.com)
https://stackoverflow.com/questions/178325/how-do-i-check-if-an-element-is-hidden-in-jquery
http://pietschsoft.com/post/2015/09/24/JavaScript-Basics-Is-Element-Hidden-or-Visible
0
1.
$(element).is(":visible");
2.
var isdisplayed = $(element).css("display");
if(isdisplay=='none') //element is hide, else, element is visible