Solved

jQuery Accordion on WordPress

Posted on 2013-10-28
3
549 Views
Last Modified: 2013-10-29
The accordion on my page chops off some of the text (please see toggle 4 on link below).  How do I set the accordion to expand as far as the last line of the text no matter how short/long the content is?

Thanks

View Sample Here
0
Comment
Question by:E-Dub
3 Comments
 
LVL 15

Assisted Solution

by:eemit
eemit earned 100 total points
ID: 39607343
Set the heightStyle option to:
heightStyle: "content"
or
heightStyle: "fill"

According to jQuery Documentation:

- Setting heightStyle: "content" allows the accordion panels to keep their native height.

- To fill the vertical space allocated by its container, set the heightStyle option to "fill", and the script will automatically set the dimensions of the accordion to the height of its parent container.
0
 
LVL 38

Accepted Solution

by:
Tom Beck earned 400 total points
ID: 39607373
Yes, what @eemit said. Add heightStyle: "content" at line 2659 in your main.js file.

     $(this).accordion({
            autoHeight: false,
            active: activeTab,
            collapsible: false,
          heightStyle: "content"
     });

"fill" is not going to get you the desired effect in this case.
0
 
LVL 1

Author Closing Comment

by:E-Dub
ID: 39608282
@ememit, thank you for pointing me in the right direction and explaining the difference between "content" and "fill."

@tommyBoy, thank you for going the extra mile and showing me exactly how and where to put the code.

You guys rock!
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now