~~~~~~~~~~~~ IMPORTANT INFORMATION -- Please read! ~~~~~~~~~~~~

1. The "search..." box above searches the Docs & Forum Posts. The "Search" tab above just searches the Forum Posts. :side:
Please use these to search for your issue *before* creating a new message topic, as your issue may have been previously solved.
2. Please put your Club # and Club Web Address in your Forum Signature (best) OR in each post to get faster support from us.
Click here to edit your signature at the bottom of the Profile Information tab.
3. Our user and admin docs are available at: support.toastmastersclubs.org/doc "There's a doc for that!" ;)
4. There is an "Opt In" Feature for newly added members. The Opt In document explains the [strike]strikethrough[/strike] member information. Click Here to View the Post
5. When posting a New Topic , please include all relevant details and be specific. When did your issue 1st occur? What operating system, browser, & browser version are you using? Did you refresh your browser cache? Are your cookies enabled? Lastly, a screen shot is often helpful.
6. Please abide by the Terms of Use . We are volunteers contributing our spare time. We are happy to assist you, so long as you are respectful and courteous.
7. We are always looking for new FreeToastHost Ambassadors to join our team and support fellow Toastmasters in their use of the FreeToastHost website system. If you are familiar with the system and have some interest, send a Send Us a Private Message.

How to put an accordion in your content...

More
10 years 5 months ago - 10 years 1 week ago #45428 by SteveTheTechie
We use the jQuery code library for FreeToastHost, but in reality any club can make use of some of its features.

Here is how to set up a real, functioning accordion in your home page, meeting info page, or custom page:

First of all copy the following to the clipboard to use as a template for your accordion...
Code:
<div id="myAccordion" class="userAccordion"> <h3>Section 1</h3> <div> This is some content. </div> <h3>Section 2</h3> <div> This is some more content. </div> <h3>Section 3</h3> <div> This is even more content. </div> </div>

Please copy the above to an empty custom web page in Source View, then you can test it out until you get it working the way you want. The above is set up for 3 accordion sections (called "panels").

There are three parts to this... (must be created in Source View for best results)
1. An overall enclosing <div> block. Use the "userAccordion" class as indicated to make FTH automatically convert this to an accordion--FTH does the script part, then. You can have an id specified (e.g. like "myAccordion"), but it is optional. (If you use an id then put your club number on end to make sure you do not clash with FTH ids.) Including script text is not necessary. FTH will handle setting this up as long as you correctly use the "userAccordion" class name.

2. h3 blocks. (heading text) You need one of these for each accordion panel, like I am showing above. These define the text that is shown on the bar that opens a panel.

3. Inner div blocks containing the actual content for each panel. This content can be anything even pictures. Remember that the h3 blocks must each be paired up with a corresponding inner div block.

Again, no JavaScript is needed for this if you use the "userAccordion" class name as indicated above. This is a FTH 2.20 advanced feature.

Do not use the same ID as I used above--make up your own and append your club number it to make them distinct from those used in FTH. (otherwise you can create name clash problems)

If you view the above in normal editor WYSIWYG view, you will just see blocks of text with headings. (It helps to toggle on the block indicators in ckeditor in normal view.) You have to save your page and exit the Admin Console to see the actual accordion.

Enjoy! Please share your webpage address on here so that we can admire your work!
Last edit: 10 years 1 week ago by SteveTheTechie.
The following user(s) said Thank You: Jane Atkinson
The topic has been locked.
  • LindaMann
  • Visitor
  • Visitor
10 years 1 week ago #51426 by LindaMann
Replied by LindaMann on topic How to put an accordion in your content...
Thank you... I knew it was simple but a little different from doing it in a regular web page...

Linda :)
The topic has been locked.
  • LindaMann
  • Visitor
  • Visitor
10 years 1 week ago #51428 by LindaMann
Replied by LindaMann on topic How to put an accordion in your content...
Hello Steve;

I got it to work, but what is the width of the other one's? I would like the one's I created to go out as far...

Here is my site: Au Jus Toastmasters

Linda
The topic has been locked.
More
10 years 1 week ago #51437 by SteveTheTechie
Well, because it is contained inside the main content area, it will never be wider than the main content area - minus the padding for the main content area. You can adjust the amount of padding with the main margin adjustment setting (appearance tab), but that adjustment affects *all* user content shown in the main content panel. (I did it that way to enforce some consistency.) So... if you change that, you should take a look at your other pages for any side effects. As you are obviously very proficient, killing the margins/padding might be a good approach for you, since you can then set margins/padding in your content as you wish with a "wrapper div".

The accordions at the bottom are set up by my code and can only be displayed or hidden. It has never been the intention by the original FTH developer or myself to allow the TI-provided content of the bottom accordion to be replaced. Therefore, there is no editor for that content... it is essentially static content, by design.
The following user(s) said Thank You: LindaMann
The topic has been locked.
  • LindaMann
  • Visitor
  • Visitor
10 years 1 week ago - 10 years 1 week ago #51438 by LindaMann
Replied by LindaMann on topic How to put an accordion in your content...
Hello there!

I have tried to put in a border to enlarge the width and I even put the width at 100%, and the width still has not expanded.... How do I make it the length of the accordians already there? Or is that possible without JavaScript?

Here is my site so far: Au Jus Toastmasters

Linda
Last edit: 10 years 1 week ago by LindaMann. Reason: Forgot to link it
The topic has been locked.
  • LindaMann
  • Visitor
  • Visitor
10 years 1 week ago #51441 by LindaMann
Replied by LindaMann on topic How to put an accordion in your content...
Alright, thank you for your reply...

What do you think of what I did? Have you seen my site since I made the changes?

Linda
The topic has been locked.
Time to create page: 0.299 seconds