How to show/hide a class
Posted: Wed Jun 23, 2010 5:46 am
Hi I have a javascript function, that checks if a class is visible or if its hidden. Problem is that this dosn't work.
this works
but this don't
in other words allPageTags.style.display is either 'none' or ''. This works to check if an id is visible, but how do i check if a class is visible, my atempt didn't work obviously.
So anyone know how to check if a current class is visible or if its "visible=='none"'??
Thanks
this works
Code: Select all
allPageTags[i].style.display = 'none';Code: Select all
if (allPageTags[i].style.display ==''){
allPageTags[i].style.display = 'none';
}
else{
allPageTags[i].style.display = '';
}So anyone know how to check if a current class is visible or if its "visible=='none"'??
Thanks