View Full Version : Expanding content(paragraph): contents are not hidden on load

03-03-2009, 09:28 PM

I have problem and would like to ask suggestion from the experts here.
I am trying to develop this expanding content as you can see here:


You see when you click on the title, any text below it will slide down and reveal more content, with nice fade-in. Everything works well for me except that when the page is loading, you can see all the hidden contents before they hide themselves. This content should always be hidden. So maybe there are some scripts I can add to fix this?


Old Pedant
03-03-2009, 10:31 PM
Hard to tell without downloading all the code and studying it carefully, which I don't have time for this moment, but...

*PROBABLY* if you just do

<h2 id="demo" class="trigger">Accessibility and Usability</h2>
<div style="display: none;">

it will work. If not, post back what happens when you do that & I'll try to go look at his actual code.

You *could* also just hide *all* content until after his scanning code is done.

That is, put *all* of the content inside a <div> with style="display: none;" and then call his code and then change the style of that outer div.

That should work, regardless.