Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript How do you make tabs open and close independently?

  • This topic is empty.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #46574
    joann7
    Participant

    How do you make tabs open and close independently?

    Right now I have three tabs and one of them is always open. I would like for them to be able to all be closed to save space.

    Here is a link to the page I am asking about http://joannfitzpatrick.com/rlv/quickvalidate-premium-0720.html

    I know it is possible because I have seen it on other sites.

    Thank you for your help.
    JoAnn

    #143834
    Paulie_D
    Member

    What JS are you using…there’s usually a switch or link to a class in there somewhere?

    #143859
    joann7
    Participant

    According to the documentation the page is using http://jqueryui.com/tabs/#collapsible .

    I see that there is a script that should be added:

    But I have tried adding it at the bottom of the head section, right after the tabs div, and below the rest of the scripts at the bottom of the page. None of this has worked.

    Where do I add this code?

    #143862
    Paulie_D
    Member

    Check the API documentation.

    http://api.jqueryui.com/tabs/#option-active

    #143882
    joann7
    Participant

    Unfortunately, for me reading the documentation does not help. I do not know java script and the person that was working on this project that does is MIA. I have already tried to solve unsuccessfully. That is why I posted here. I don’t think this is complicated for someone that knows what they are doing. I was hoping some kind person that knows java script would be able to say add this line of code here.

    #143884
    PicnicTutorials
    Participant

    You could modify an “accordian” script. Just the css. Could be done with pure css or JS and css. I have both in an accordian if you need.

    #143887
    joann7
    Participant

    Thank you. That would be fantastic.

    #143889
    PicnicTutorials
    Participant

    Here is the accordian JS/css one I used back in the day. has all the options. http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm.

    And here is a pure css version I built. http://www.websitecodetutorials.com/code/css/simple-css3-accordion-demo.php.

    You or someone should be able to adjust the css to match your project.

    #143872
    Paulie_D
    Member
    #143873
    PicnicTutorials
    Participant

    Do pens not work on iPhone? Cuz I just have a white box with no tabs

    #143875
    Paulie_D
    Member

    No idea…works fine on my laptop

Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.