Solved

jQuery Accordion on WordPress

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

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.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like theā€¦
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

831 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