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: http://joannfitzpatrick.com/rlv/quickvalidate-basic.html
    Thank you for your help. JoAnn

    # July 17, 2013 at 5:26 pm

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

    $(‘.acc_content:eq(0)’).show();

    # 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.

*May or may not contain any actual "CSS" or "Tricks".