Solved

jQuery Accordion on WordPress

Posted on 2013-10-28
3
565 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

729 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