Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Thanked 0 Times in 0 Posts

    Angry Expanding content(paragraph): contents are not hidden on load


    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?


  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Thanked 4,741 Times in 4,703 Posts
    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.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts