Forum Moderators: open

Message Too Old, No Replies

how to get CSS information with javascrpt

Need to know if the div is visible or hidden

         

vsgill

3:07 am on Jun 11, 2007 (gmt 0)

10+ Year Member



Hello friends
I am new with Java script and tried to look over the internet if this is even possible.
....
I need to know if a div's visibility is set to "hidden" in "visible" in CSS

i tried something like this.. but it does not work..


var showListDivID = document.getElementById(id);
alert(showListDivID.style.visibility)

Is something like this possible, if yes... how?
Thanks
Vik

Arno_Adams

12:00 pm on Jun 11, 2007 (gmt 0)

10+ Year Member



Hi,

You could try:


document.getElementById('elementID').currentStyle.visibility;

HTH, AA