Solved

jQuery Accordion on WordPress

Posted on 2013-10-28
3
550 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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 receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

932 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

13 Experts available now in Live!

Get 1:1 Help Now