As for condition #2 ("JavaScript disabled, Stylesheets enabled") mentioned in my previous post on this topic, I have found a better solution to the distracting "peek-a-boo" effect inherent in my previous solution. In the HEAD of the page, I have now put:
<script type="text/javascript"><!--
hideHiddenDivs( );
// --></script>
where hideHiddenDivs() is defined as:
function hideHiddenDivs( )
{
if( document.getElementById)
{
document.write(
'<style type="text/css"> div.hidden { display: none; } </style>');
}
}
I could have put this scriptlet inline, but there seems to be a problem with the parser of the W3C validator tool which complains about a "</style>" that does not end a STYLE element.
(Originally posted on Advogato.)
|
Tweet |
|
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.