If I have some XHTML that I want to transform into something else through JS (say I have a list of links to images and I want to transform it into a fancy JS-based slide-show), and I do this by calling some JS code in window.onload (in an external .js file).
The page starts loading, then the list is displayed, then once the whole page has been loaded the JS is processed, and the list is then turned into the fancy JS slide-show. The problem is, it's not very nice to *first* see the list, and then see it disappear and be substituted by something else by the JS. What would be the best way to hide the list?
I don't want to hide it with CSS because it should be visible for non JS but CSS capable agents. I came up with:
But I hate that script block. Any ideas?Code:<ul id='foo'> <script> document.getElementById('foo').style.display = "none"; </script> ... the rest of the list follows
If my explanation is confusing, I can post an example.








Bookmarks