Treehouse: Grow your CSS skills. Land your dream job.

How do I stop first accordion tab from automatically opening in browser

  • # July 17, 2013 at 4:55 pm

    Someone in the css section said it was probally a js issue, so I am reposting here.

    I have a page that has two accordion tab sections on it. Which ever tab is first on the page automatically opens on page load. I do not want this to happen.

    I know that it is connected to `


    In dreamweaver the code looks like this `

    `, but when I view in a browser it looks like this `

    Where is the style=”display: block;” getting added? how can I stop it?

    Here is a link to the page:
    Thank you for your help. JoAnn

    # July 17, 2013 at 5:26 pm

    Remove this line from script.js (line 75):


    # July 17, 2013 at 6:08 pm

    Thank you CrocoDillon! You are awesome!

    # July 17, 2013 at 6:44 pm

    You’re welcome :)

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.