Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Test condition for visibility check in JavaScript

I'd like to know if there's a test conditions using which one can check the visibility state(hidden or visible) of a tag.

I mean a test condition,which could be used with the if() statement.

thanks!

like image 755
Anant Avatar asked Oct 11 '10 06:10

Anant


1 Answers

if you are using jQuery then:

$('#id').is(':visible');
like image 132
Jarrett Widman Avatar answered Sep 25 '22 13:09

Jarrett Widman