+ 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?

10th Jan 2018, 7:53 PM
Hasan Jafarov
Hasan Jafarov - avatar
4 Answers
0
i found. $(element).is(":visible");
10th Jan 2018, 8:16 PM
Hasan Jafarov
Hasan Jafarov - avatar
0
or $("element:hidden") $("element:show")
10th Jan 2018, 8:17 PM
Hasan Jafarov
Hasan Jafarov - avatar
10th Jan 2018, 8:18 PM
MouradSk
MouradSk - avatar
0
1. $(element).is(":visible"); 2. var isdisplayed = $(element).css("display"); if(isdisplay=='none') //element is hide, else, element is visible
11th Jan 2018, 12:22 AM
majid sadr
majid sadr - avatar