Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorEmser
    • CommentTimeSep 29th 2010
     permalink
    Hi, I'm trying to get a Java Script accordion to work at a site I'm designing and I'm kind of new to css and really new to JS so I have some problems:

    You can see the page and html at: http://www.brakropp.se/NY/tjanster.html
    CSS here: http://www.brakropp.se/NY/css/brakropp.css
    JS here: http://www.brakropp.se/NY/js/accordion.js

    As you can see, I've tried to make two accordion thingies next to each other, and the left column work perfectly pushing the content below down when it opens. But the right accordion opens up on top of the content underneath. I know it's probably because I have position: absolute but I don't understand how else to do it (position: relative messes it up even more).

    Also, I managed to get the plus sign to change to a minus when you click the accordion open, but how do I get it to change back to a plus once you've closed it again?

    Can anybody help a confused graphic designer??
    • CommentAuthorvinz
    • CommentTimeOct 1st 2010
     permalink
    Hi Emser,

    I check your test site and it looks like pixel-perfect in firefox 3.6.
    I must say, your code looks really clean and small, how do you make it like after all the closing the first tab is opening by default?

    cheers,
    vinz
    • CommentAuthorEmser
    • CommentTimeOct 1st 2010
     permalink
    Hi Vinz!

    Yeah I got some help from a web developer :)
    So I finally got it to work, but I'm not exactly sure how... I'm really crap at Java script, but maybe you can get some clues from the code?

    :)
    • CommentAuthorvinz
    • CommentTimeOct 1st 2010
     permalink
    Yes, I did some work and it works great thanks! Idea is making an extra class and add some talking to it.
Add your comments
    Username Password
  • Format comments as (Help)